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

Side by Side Diff: chrome/browser/chromeos/chrome_interface_factory.cc

Issue 2428173002: mash: Remove app_driver. (Closed)
Patch Set: Rebase to ToT Created 4 years, 1 month 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 | « chrome/app/mash/BUILD.gn ('k') | chrome/test/BUILD.gn » ('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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "chrome/browser/chromeos/chrome_interface_factory.h" 5 #include "chrome/browser/chromeos/chrome_interface_factory.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "ash/common/mojo_interface_factory.h" 9 #include "ash/common/mojo_interface_factory.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 52
53 void CreateNewTab() { chrome::NewTab(chrome::FindLastActive()); } 53 void CreateNewTab() { chrome::NewTab(chrome::FindLastActive()); }
54 54
55 // mash::mojom::Launchable: 55 // mash::mojom::Launchable:
56 void Launch(uint32_t what, mash::mojom::LaunchMode how) override { 56 void Launch(uint32_t what, mash::mojom::LaunchMode how) override {
57 if (how != mash::mojom::LaunchMode::MAKE_NEW) { 57 if (how != mash::mojom::LaunchMode::MAKE_NEW) {
58 LOG(ERROR) << "Unable to handle Launch request with how = " << how; 58 LOG(ERROR) << "Unable to handle Launch request with how = " << how;
59 return; 59 return;
60 } 60 }
61 switch (what) { 61 switch (what) {
62 case mash::mojom::kDocument:
63 CreateNewTab();
64 break;
65 case mash::mojom::kWindow: 62 case mash::mojom::kWindow:
66 CreateNewWindowImpl(false /* is_incognito */); 63 CreateNewWindowImpl(false /* is_incognito */);
67 break; 64 break;
68 case mash::mojom::kIncognitoWindow: 65 case mash::mojom::kIncognitoWindow:
69 CreateNewWindowImpl(true /* is_incognito */); 66 CreateNewWindowImpl(true /* is_incognito */);
70 break; 67 break;
71 default: 68 default:
72 NOTREACHED(); 69 NOTREACHED();
73 } 70 }
74 } 71 }
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 // In classic ash, the browser process provides ash services to itself. 180 // In classic ash, the browser process provides ash services to itself.
184 if (!chrome::IsRunningInMash()) { 181 if (!chrome::IsRunningInMash()) {
185 ash::mojo_interface_factory::RegisterInterfaces(registry, 182 ash::mojo_interface_factory::RegisterInterfaces(registry,
186 main_thread_task_runner_); 183 main_thread_task_runner_);
187 } 184 }
188 185
189 return true; 186 return true;
190 } 187 }
191 188
192 } // namespace chromeos 189 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/app/mash/BUILD.gn ('k') | chrome/test/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698