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

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

Issue 1984433002: Hook up Chrome's wallpaper picker for mash. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix gyp builds; address Sadrul's comment. Created 4 years, 7 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
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 #ifndef CHROME_BROWSER_CHROMEOS_CHROME_INTERFACE_FACTORY_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_CHROME_INTERFACE_FACTORY_H_
6 #define CHROME_BROWSER_CHROMEOS_CHROME_INTERFACE_FACTORY_H_ 6 #define CHROME_BROWSER_CHROMEOS_CHROME_INTERFACE_FACTORY_H_
7 7
8 #include "content/public/common/mojo_shell_connection.h" 8 #include "content/public/common/mojo_shell_connection.h"
9 #include "mash/public/interfaces/launchable.mojom.h" 9 #include "mash/public/interfaces/launchable.mojom.h"
10 #include "mash/public/interfaces/wallpaper.mojom.h"
10 #include "mojo/public/cpp/bindings/binding_set.h" 11 #include "mojo/public/cpp/bindings/binding_set.h"
11 #include "services/shell/public/cpp/interface_factory.h" 12 #include "services/shell/public/cpp/interface_factory.h"
12 #include "ui/app_list/presenter/app_list_presenter.mojom.h" 13 #include "ui/app_list/presenter/app_list_presenter.mojom.h"
13 #include "ui/keyboard/keyboard.mojom.h" 14 #include "ui/keyboard/keyboard.mojom.h"
14 15
15 class AppListPresenterService; 16 class AppListPresenterService;
16 class ChromeLaunchable; 17 class ChromeLaunchable;
18 class ChromeWallpaperHelper;
17 class KeyboardUIService; 19 class KeyboardUIService;
18 20
19 namespace chromeos { 21 namespace chromeos {
20 22
21 // InterfaceFactory for creating all services provided by chrome. 23 // InterfaceFactory for creating all services provided by chrome.
22 class ChromeInterfaceFactory 24 class ChromeInterfaceFactory
23 : public content::MojoShellConnection::Listener, 25 : public content::MojoShellConnection::Listener,
24 public shell::InterfaceFactory<mash::mojom::Launchable>, 26 public shell::InterfaceFactory<mash::mojom::Launchable>,
27 public shell::InterfaceFactory<mash::mojom::WallpaperHelper>,
25 public shell::InterfaceFactory<app_list::mojom::AppListPresenter>, 28 public shell::InterfaceFactory<app_list::mojom::AppListPresenter>,
26 public shell::InterfaceFactory<keyboard::mojom::Keyboard> { 29 public shell::InterfaceFactory<keyboard::mojom::Keyboard> {
James Cook 2016/05/19 22:30:00 optional: While you're here, maybe move Keyboard u
msw 2016/05/20 19:53:05 Done.
27 public: 30 public:
28 ChromeInterfaceFactory(); 31 ChromeInterfaceFactory();
29 ~ChromeInterfaceFactory() override; 32 ~ChromeInterfaceFactory() override;
30 33
31 private: 34 private:
32 // content::MojoShellConnection::Listener: 35 // content::MojoShellConnection::Listener:
33 bool AcceptConnection(shell::Connection* connection) override; 36 bool AcceptConnection(shell::Connection* connection) override;
34 37
35 // shell::InterfaceFactory<keyboard::Keyboard>: 38 // shell::InterfaceFactory<keyboard::Keyboard>:
36 void Create( 39 void Create(
37 shell::Connection* connection, 40 shell::Connection* connection,
38 mojo::InterfaceRequest<keyboard::mojom::Keyboard> request) override; 41 mojo::InterfaceRequest<keyboard::mojom::Keyboard> request) override;
39 42
40 // mojo::InterfaceFactory<mash::mojom::Launchable> 43 // mojo::InterfaceFactory<mash::mojom::Launchable>
41 void Create(shell::Connection* connection, 44 void Create(shell::Connection* connection,
42 mash::mojom::LaunchableRequest request) override; 45 mash::mojom::LaunchableRequest request) override;
43 46
47 // mojo::InterfaceFactory<mash::mojom::WallpaperHelper>
48 void Create(shell::Connection* connection,
49 mash::mojom::WallpaperHelperRequest request) override;
50
44 // mojo::InterfaceFactory<app_list::AppListPresenter>: 51 // mojo::InterfaceFactory<app_list::AppListPresenter>:
45 void Create(shell::Connection* connection, 52 void Create(shell::Connection* connection,
46 mojo::InterfaceRequest<app_list::mojom::AppListPresenter> request) 53 mojo::InterfaceRequest<app_list::mojom::AppListPresenter> request)
47 override; 54 override;
48 55
49 std::unique_ptr<KeyboardUIService> keyboard_ui_service_; 56 std::unique_ptr<KeyboardUIService> keyboard_ui_service_;
50 mojo::BindingSet<keyboard::mojom::Keyboard> keyboard_bindings_; 57 mojo::BindingSet<keyboard::mojom::Keyboard> keyboard_bindings_;
51 std::unique_ptr<ChromeLaunchable> launchable_; 58 std::unique_ptr<ChromeLaunchable> launchable_;
59 std::unique_ptr<ChromeWallpaperHelper> wallpaper_helper_;
52 std::unique_ptr<AppListPresenterService> app_list_presenter_service_; 60 std::unique_ptr<AppListPresenterService> app_list_presenter_service_;
53 mojo::BindingSet<app_list::mojom::AppListPresenter> 61 mojo::BindingSet<app_list::mojom::AppListPresenter>
54 app_list_presenter_bindings_; 62 app_list_presenter_bindings_;
55 63
56 DISALLOW_COPY_AND_ASSIGN(ChromeInterfaceFactory); 64 DISALLOW_COPY_AND_ASSIGN(ChromeInterfaceFactory);
57 }; 65 };
58 66
59 } // namespace chromeos 67 } // namespace chromeos
60 68
61 #endif // CHROME_BROWSER_CHROMEOS_CHROME_INTERFACE_FACTORY_H_ 69 #endif // CHROME_BROWSER_CHROMEOS_CHROME_INTERFACE_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698