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

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

Issue 2111353002: Move content's shell connections to the IO thread (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 5 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 "ash/sysui/public/interfaces/wallpaper.mojom.h" 8 #include "base/macros.h"
9 #include "content/public/common/mojo_shell_connection.h" 9 #include "base/memory/ref_counted.h"
10 #include "mash/public/interfaces/launchable.mojom.h" 10 #include "base/single_thread_task_runner.h"
11 #include "mojo/public/cpp/bindings/binding_set.h" 11 #include "content/public/common/connection_filter.h"
12 #include "services/shell/public/cpp/interface_factory.h"
13 #include "services/shell/public/cpp/service.h"
14 #include "ui/app_list/presenter/app_list_presenter.mojom.h"
15 #include "ui/keyboard/keyboard.mojom.h"
16
17 class AppListPresenterService;
18 class ChromeLaunchable;
19 class ChromeWallpaperManager;
20 class KeyboardUIService;
21 12
22 namespace chromeos { 13 namespace chromeos {
23 14
24 // InterfaceFactory for creating all services provided by chrome. 15 // InterfaceFactory for creating all services provided by chrome.
25 class ChromeInterfaceFactory 16 class ChromeInterfaceFactory : public content::ConnectionFilter {
26 : public shell::Service,
27 public shell::InterfaceFactory<keyboard::mojom::Keyboard>,
28 public shell::InterfaceFactory<mash::mojom::Launchable>,
29 public shell::InterfaceFactory<ash::sysui::mojom::WallpaperManager>,
30 public shell::InterfaceFactory<app_list::mojom::AppListPresenter> {
31 public: 17 public:
32 ChromeInterfaceFactory(); 18 ChromeInterfaceFactory();
33 ~ChromeInterfaceFactory() override; 19 ~ChromeInterfaceFactory() override;
34 20
35 private: 21 private:
36 // shell::Service: 22 // content::ConnectionFilter:
37 bool OnConnect(shell::Connection* connection) override; 23 bool AcceptConnection(shell::Connection* connection,
Ben Goodger (Google) 2016/07/05 21:39:45 OnConnect, now.
Ken Rockot(use gerrit already) 2016/07/06 17:09:57 done
24 shell::Connector* connector) override;
38 25
39 // shell::InterfaceFactory<keyboard::Keyboard>: 26 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_;
40 void Create(
41 shell::Connection* connection,
42 mojo::InterfaceRequest<keyboard::mojom::Keyboard> request) override;
43
44 // mojo::InterfaceFactory<mash::mojom::Launchable>
45 void Create(shell::Connection* connection,
46 mash::mojom::LaunchableRequest request) override;
47
48 // mojo::InterfaceFactory<ash::sysui::mojom::WallpaperManager>
49 void Create(shell::Connection* connection,
50 ash::sysui::mojom::WallpaperManagerRequest request) override;
51
52 // mojo::InterfaceFactory<app_list::AppListPresenter>:
53 void Create(shell::Connection* connection,
54 mojo::InterfaceRequest<app_list::mojom::AppListPresenter> request)
55 override;
56
57 std::unique_ptr<KeyboardUIService> keyboard_ui_service_;
58 mojo::BindingSet<keyboard::mojom::Keyboard> keyboard_bindings_;
59 std::unique_ptr<ChromeLaunchable> launchable_;
60 std::unique_ptr<ChromeWallpaperManager> wallpaper_manager_;
61 std::unique_ptr<AppListPresenterService> app_list_presenter_service_;
62 mojo::BindingSet<app_list::mojom::AppListPresenter>
63 app_list_presenter_bindings_;
64 27
65 DISALLOW_COPY_AND_ASSIGN(ChromeInterfaceFactory); 28 DISALLOW_COPY_AND_ASSIGN(ChromeInterfaceFactory);
66 }; 29 };
67 30
68 } // namespace chromeos 31 } // namespace chromeos
69 32
70 #endif // CHROME_BROWSER_CHROMEOS_CHROME_INTERFACE_FACTORY_H_ 33 #endif // CHROME_BROWSER_CHROMEOS_CHROME_INTERFACE_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698