Commit 464f57c3 authored by James Cook's avatar James Cook Committed by Commit Bot

lacros: Launch lacros-chrome via upstart when the shelf icon is clicked

For now, always create a new window. Each running lacros browser window
already gets a temporary "running dialog" shelf icon which can be used
to minimize or close the lacros instance.

Bug: 1072472
Test: manual, flip LacrosSideBySide flag, click shelf icon
Change-Id: I006f2e6c2a180092d3f3603d4141a9fd69b29864
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2163778Reviewed-by: default avatarErik Chen <erikchen@chromium.org>
Commit-Queue: James Cook <jamescook@chromium.org>
Cr-Commit-Position: refs/heads/master@{#762153}
parent 75203990
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
#include "chrome/browser/ui/ash/launcher/lacros_browser_shelf_item_delegate.h" #include "chrome/browser/ui/ash/launcher/lacros_browser_shelf_item_delegate.h"
#include "ash/public/cpp/shelf_types.h" #include "ash/public/cpp/shelf_types.h"
#include "base/logging.h" #include "chromeos/dbus/upstart/upstart_client.h"
#include "extensions/common/constants.h" #include "extensions/common/constants.h"
LacrosBrowserShelfItemDelegate::LacrosBrowserShelfItemDelegate() LacrosBrowserShelfItemDelegate::LacrosBrowserShelfItemDelegate()
...@@ -20,7 +20,7 @@ void LacrosBrowserShelfItemDelegate::ItemSelected( ...@@ -20,7 +20,7 @@ void LacrosBrowserShelfItemDelegate::ItemSelected(
ItemSelectedCallback callback) { ItemSelectedCallback callback) {
// TODO(lacros): Handle window activation, window minimize, and spawning a // TODO(lacros): Handle window activation, window minimize, and spawning a
// menu with a list of browser windows. // menu with a list of browser windows.
NOTIMPLEMENTED() << "Launch lacros-chrome via upstart"; chromeos::UpstartClient::Get()->StartLacrosChrome({"NEW_WINDOW=1"});
std::move(callback).Run(ash::SHELF_ACTION_NEW_WINDOW_CREATED, {}); std::move(callback).Run(ash::SHELF_ACTION_NEW_WINDOW_CREATED, {});
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment