Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(12)

Unified Diff: mash/login/login.cc

Issue 1899323002: Add mash shelf application id support. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address simpler comments. Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: mash/login/login.cc
diff --git a/mash/login/login.cc b/mash/login/login.cc
index 93bce35012c240c5a2306d5b98a486b396e705c7..c441dd8d33cb119fa478727b2d3ebddb6a6f6ff3 100644
--- a/mash/login/login.cc
+++ b/mash/login/login.cc
@@ -36,11 +36,13 @@ class Login;
class UI : public views::WidgetDelegateView,
public views::ButtonListener {
public:
- static void Show(shell::Connector* connector, Login* login) {
+ static void Show(shell::Connector* connector,
+ const shell::Identity& identity,
+ Login* login) {
UI* ui = new UI(login, connector);
ui->StartWindowManager();
- views::WindowManagerConnection::Create(connector);
+ views::WindowManagerConnection::Create(connector, identity);
views::Widget* widget = new views::Widget;
views::Widget::InitParams params(
@@ -149,6 +151,7 @@ class Login : public shell::ShellClient,
const shell::Identity& identity,
uint32_t id) override {
connector_ = connector;
+ identity_ = identity;
tracing_.Initialize(connector, identity.name());
aura_init_.reset(new views::AuraInit(connector, "views_mus_resources.pak"));
@@ -168,16 +171,13 @@ class Login : public shell::ShellClient,
}
// mojom::Login:
- void ShowLoginUI() override {
- UI::Show(connector_, this);
- }
- void SwitchUser() override {
- UI::Show(connector_, this);
- }
+ void ShowLoginUI() override { UI::Show(connector_, identity_, this); }
+ void SwitchUser() override { UI::Show(connector_, identity_, this); }
void StartWindowManager();
shell::Connector* connector_;
+ shell::Identity identity_;
mojo::TracingImpl tracing_;
std::unique_ptr<views::AuraInit> aura_init_;
mojo::BindingSet<mojom::Login> bindings_;
« no previous file with comments | « mash/example/window_type_launcher/window_type_launcher.cc ('k') | mash/quick_launch/quick_launch_application.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698