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

Side by Side Diff: mash/shell/shell_application_delegate.cc

Issue 1769163002: Add a instance groups to Connect(), and introduce an Identity struct. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 9 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 unified diff | Download patch
« no previous file with comments | « mash/shell/shell_application_delegate.h ('k') | mash/task_viewer/task_viewer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "mash/shell/shell_application_delegate.h" 5 #include "mash/shell/shell_application_delegate.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "mojo/shell/public/cpp/connection.h" 9 #include "mojo/shell/public/cpp/connection.h"
10 #include "mojo/shell/public/cpp/connector.h" 10 #include "mojo/shell/public/cpp/connector.h"
11 11
12 namespace mash { 12 namespace mash {
13 namespace shell { 13 namespace shell {
14 14
15 ShellApplicationDelegate::ShellApplicationDelegate() 15 ShellApplicationDelegate::ShellApplicationDelegate()
16 : connector_(nullptr), screen_locked_(false) {} 16 : connector_(nullptr), screen_locked_(false) {}
17 17
18 ShellApplicationDelegate::~ShellApplicationDelegate() {} 18 ShellApplicationDelegate::~ShellApplicationDelegate() {}
19 19
20 void ShellApplicationDelegate::Initialize(mojo::Connector* connector, 20 void ShellApplicationDelegate::Initialize(mojo::Connector* connector,
21 const std::string& url, 21 const mojo::Identity& identity,
22 const std::string& user_id,
23 uint32_t id) { 22 uint32_t id) {
24 connector_ = connector; 23 connector_ = connector;
25 StartBrowserDriver(); 24 StartBrowserDriver();
26 StartWindowManager(); 25 StartWindowManager();
27 StartSystemUI(); 26 StartSystemUI();
28 StartQuickLaunch(); 27 StartQuickLaunch();
29 } 28 }
30 29
31 bool ShellApplicationDelegate::AcceptConnection(mojo::Connection* connection) { 30 bool ShellApplicationDelegate::AcceptConnection(mojo::Connection* connection) {
32 connection->AddInterface<mojom::Shell>(this); 31 connection->AddInterface<mojom::Shell>(this);
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 // Note: |connection| may be null if we've lost our connection to the shell. 114 // Note: |connection| may be null if we've lost our connection to the shell.
116 if (connection) { 115 if (connection) {
117 connection->SetConnectionLostClosure(restart_callback); 116 connection->SetConnectionLostClosure(restart_callback);
118 connection->AddInterface<mojom::Shell>(this); 117 connection->AddInterface<mojom::Shell>(this);
119 connections_[url] = std::move(connection); 118 connections_[url] = std::move(connection);
120 } 119 }
121 } 120 }
122 121
123 } // namespace shell 122 } // namespace shell
124 } // namespace main 123 } // namespace main
OLDNEW
« no previous file with comments | « mash/shell/shell_application_delegate.h ('k') | mash/task_viewer/task_viewer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698