OLD | NEW |
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 #ifndef MANDOLINE_UI_DESKTOP_UI_BROWSER_MANAGER_H_ | 5 #ifndef MANDOLINE_UI_DESKTOP_UI_BROWSER_MANAGER_H_ |
6 #define MANDOLINE_UI_DESKTOP_UI_BROWSER_MANAGER_H_ | 6 #define MANDOLINE_UI_DESKTOP_UI_BROWSER_MANAGER_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "components/mus/public/interfaces/window_tree_host.mojom.h" | 11 #include "components/mus/public/interfaces/window_tree_host.mojom.h" |
12 #include "mandoline/ui/desktop_ui/public/interfaces/launch_handler.mojom.h" | 12 #include "mandoline/ui/desktop_ui/public/interfaces/launch_handler.mojom.h" |
13 #include "mojo/common/weak_binding_set.h" | 13 #include "mojo/common/weak_binding_set.h" |
14 #include "mojo/services/tracing/public/cpp/tracing_impl.h" | 14 #include "mojo/services/tracing/public/cpp/tracing_impl.h" |
15 #include "mojo/shell/public/cpp/application_delegate.h" | 15 #include "mojo/shell/public/cpp/application_delegate.h" |
16 #include "mojo/shell/public/cpp/application_impl.h" | |
17 #include "mojo/shell/public/cpp/connect.h" | |
18 #include "url/gurl.h" | 16 #include "url/gurl.h" |
19 | 17 |
20 namespace mojo { | 18 namespace mojo { |
21 class View; | 19 class View; |
22 } | 20 } |
23 | 21 |
24 namespace mandoline { | 22 namespace mandoline { |
25 | 23 |
26 class BrowserWindow; | 24 class BrowserWindow; |
27 | 25 |
(...skipping 11 matching lines...) Expand all Loading... |
39 void BrowserWindowClosed(BrowserWindow* browser); | 37 void BrowserWindowClosed(BrowserWindow* browser); |
40 | 38 |
41 // Get the time recorded just before the application message loop was started. | 39 // Get the time recorded just before the application message loop was started. |
42 const base::TimeTicks& startup_ticks() const { return startup_ticks_; } | 40 const base::TimeTicks& startup_ticks() const { return startup_ticks_; } |
43 | 41 |
44 private: | 42 private: |
45 // Overridden from LaunchHandler: | 43 // Overridden from LaunchHandler: |
46 void LaunchURL(const mojo::String& url) override; | 44 void LaunchURL(const mojo::String& url) override; |
47 | 45 |
48 // Overridden from mojo::ApplicationDelegate: | 46 // Overridden from mojo::ApplicationDelegate: |
49 void Initialize(mojo::ApplicationImpl* app) override; | 47 void Initialize(mojo::Shell* shell, const std::string& url, |
| 48 uint32_t id) override; |
50 bool AcceptConnection( | 49 bool AcceptConnection( |
51 mojo::ApplicationConnection* connection) override; | 50 mojo::ApplicationConnection* connection) override; |
52 | 51 |
53 // Overridden from mojo::InterfaceFactory<LaunchHandler>: | 52 // Overridden from mojo::InterfaceFactory<LaunchHandler>: |
54 void Create(mojo::ApplicationConnection* connection, | 53 void Create(mojo::ApplicationConnection* connection, |
55 mojo::InterfaceRequest<LaunchHandler> request) override; | 54 mojo::InterfaceRequest<LaunchHandler> request) override; |
56 | 55 |
57 mojo::ApplicationImpl* app_; | 56 mojo::Shell* shell_; |
58 mojo::TracingImpl tracing_; | 57 mojo::TracingImpl tracing_; |
59 mus::mojom::WindowTreeHostFactoryPtr host_factory_; | 58 mus::mojom::WindowTreeHostFactoryPtr host_factory_; |
60 mojo::WeakBindingSet<LaunchHandler> launch_handler_bindings_; | 59 mojo::WeakBindingSet<LaunchHandler> launch_handler_bindings_; |
61 std::set<BrowserWindow*> browsers_; | 60 std::set<BrowserWindow*> browsers_; |
62 const base::TimeTicks startup_ticks_; | 61 const base::TimeTicks startup_ticks_; |
63 | 62 |
64 DISALLOW_COPY_AND_ASSIGN(BrowserManager); | 63 DISALLOW_COPY_AND_ASSIGN(BrowserManager); |
65 }; | 64 }; |
66 | 65 |
67 } // namespace mandoline | 66 } // namespace mandoline |
68 | 67 |
69 #endif // MANDOLINE_UI_DESKTOP_UI_BROWSER_MANAGER_H_ | 68 #endif // MANDOLINE_UI_DESKTOP_UI_BROWSER_MANAGER_H_ |
OLD | NEW |