OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "base/bind.h" | 5 #include "base/bind.h" |
6 #include "base/macros.h" | 6 #include "base/macros.h" |
7 #include "examples/window_manager/debug_panel_host.mojom.h" | 7 #include "examples/window_manager/debug_panel_host.mojom.h" |
8 #include "examples/window_manager/window_manager.mojom.h" | 8 #include "examples/window_manager/window_manager.mojom.h" |
9 #include "mojo/application/application_runner_chromium.h" | 9 #include "mojo/application/application_runner_chromium.h" |
10 #include "mojo/common/weak_binding_set.h" | 10 #include "mojo/common/binding_set.h" |
11 #include "mojo/converters/geometry/geometry_type_converters.h" | 11 #include "mojo/converters/geometry/geometry_type_converters.h" |
12 #include "mojo/converters/input_events/input_events_type_converters.h" | 12 #include "mojo/converters/input_events/input_events_type_converters.h" |
13 #include "mojo/public/c/system/main.h" | 13 #include "mojo/public/c/system/main.h" |
14 #include "mojo/public/cpp/application/application_connection.h" | 14 #include "mojo/public/cpp/application/application_connection.h" |
15 #include "mojo/public/cpp/application/application_delegate.h" | 15 #include "mojo/public/cpp/application/application_delegate.h" |
16 #include "mojo/public/cpp/application/application_impl.h" | 16 #include "mojo/public/cpp/application/application_impl.h" |
17 #include "mojo/public/cpp/application/service_provider_impl.h" | 17 #include "mojo/public/cpp/application/service_provider_impl.h" |
18 #include "mojo/public/cpp/bindings/strong_binding.h" | 18 #include "mojo/public/cpp/bindings/strong_binding.h" |
19 #include "mojo/services/input_events/public/interfaces/input_events.mojom.h" | 19 #include "mojo/services/input_events/public/interfaces/input_events.mojom.h" |
20 #include "mojo/services/navigation/public/interfaces/navigation.mojom.h" | 20 #include "mojo/services/navigation/public/interfaces/navigation.mojom.h" |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 private: | 81 private: |
82 void DidNavigateLocally(const mojo::String& url) override; | 82 void DidNavigateLocally(const mojo::String& url) override; |
83 void RequestNavigate(Target target, URLRequestPtr request) override; | 83 void RequestNavigate(Target target, URLRequestPtr request) override; |
84 void RequestNavigateHistory(int32_t delta) override; | 84 void RequestNavigateHistory(int32_t delta) override; |
85 | 85 |
86 WindowManager* window_manager_; | 86 WindowManager* window_manager_; |
87 Id view_id_; | 87 Id view_id_; |
88 std::vector<std::string> history_; | 88 std::vector<std::string> history_; |
89 int32_t current_index_; | 89 int32_t current_index_; |
90 | 90 |
91 WeakBindingSet<NavigatorHost> bindings_; | 91 BindingSet<NavigatorHost> bindings_; |
92 | 92 |
93 DISALLOW_COPY_AND_ASSIGN(NavigatorHostImpl); | 93 DISALLOW_COPY_AND_ASSIGN(NavigatorHostImpl); |
94 }; | 94 }; |
95 | 95 |
96 class RootLayoutManager : public ViewObserver { | 96 class RootLayoutManager : public ViewObserver { |
97 public: | 97 public: |
98 RootLayoutManager(ViewManager* view_manager, | 98 RootLayoutManager(ViewManager* view_manager, |
99 View* root, | 99 View* root, |
100 Id content_view_id, | 100 Id content_view_id, |
101 Id launcher_ui_view_id, | 101 Id launcher_ui_view_id, |
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
531 ++current_index_; | 531 ++current_index_; |
532 } | 532 } |
533 | 533 |
534 } // namespace examples | 534 } // namespace examples |
535 } // namespace mojo | 535 } // namespace mojo |
536 | 536 |
537 MojoResult MojoMain(MojoHandle application_request) { | 537 MojoResult MojoMain(MojoHandle application_request) { |
538 mojo::ApplicationRunnerChromium runner(new mojo::examples::WindowManager); | 538 mojo::ApplicationRunnerChromium runner(new mojo::examples::WindowManager); |
539 return runner.Run(application_request); | 539 return runner.Run(application_request); |
540 } | 540 } |
OLD | NEW |