OLD | NEW |
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 SERVICES_NAVIGATION_VIEW_IMPL_H_ | 5 #ifndef SERVICES_NAVIGATION_VIEW_IMPL_H_ |
6 #define SERVICES_NAVIGATION_VIEW_IMPL_H_ | 6 #define SERVICES_NAVIGATION_VIEW_IMPL_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 15 matching lines...) Expand all Loading... |
26 } | 26 } |
27 | 27 |
28 namespace navigation { | 28 namespace navigation { |
29 | 29 |
30 class ViewImpl : public mojom::View, | 30 class ViewImpl : public mojom::View, |
31 public content::WebContentsDelegate, | 31 public content::WebContentsDelegate, |
32 public content::NotificationObserver, | 32 public content::NotificationObserver, |
33 public ui::WindowTreeClientDelegate, | 33 public ui::WindowTreeClientDelegate, |
34 public views::WidgetDelegate { | 34 public views::WidgetDelegate { |
35 public: | 35 public: |
36 ViewImpl(std::unique_ptr<shell::Connector> connector, | 36 ViewImpl(std::unique_ptr<service_manager::Connector> connector, |
37 const std::string& client_user_id, | 37 const std::string& client_user_id, |
38 mojom::ViewClientPtr client, | 38 mojom::ViewClientPtr client, |
39 std::unique_ptr<shell::ServiceContextRef> ref); | 39 std::unique_ptr<service_manager::ServiceContextRef> ref); |
40 ~ViewImpl() override; | 40 ~ViewImpl() override; |
41 | 41 |
42 private: | 42 private: |
43 // mojom::View: | 43 // mojom::View: |
44 void NavigateTo(const GURL& url) override; | 44 void NavigateTo(const GURL& url) override; |
45 void GoBack() override; | 45 void GoBack() override; |
46 void GoForward() override; | 46 void GoForward() override; |
47 void NavigateToOffset(int offset) override; | 47 void NavigateToOffset(int offset) override; |
48 void Reload(bool skip_cache) override; | 48 void Reload(bool skip_cache) override; |
49 void Stop() override; | 49 void Stop() override; |
(...skipping 30 matching lines...) Expand all Loading... |
80 void OnEmbedRootDestroyed(ui::Window* root) override; | 80 void OnEmbedRootDestroyed(ui::Window* root) override; |
81 void OnLostConnection(ui::WindowTreeClient* client) override; | 81 void OnLostConnection(ui::WindowTreeClient* client) override; |
82 void OnPointerEventObserved(const ui::PointerEvent& event, | 82 void OnPointerEventObserved(const ui::PointerEvent& event, |
83 ui::Window* target) override; | 83 ui::Window* target) override; |
84 | 84 |
85 // views::WidgetDelegate: | 85 // views::WidgetDelegate: |
86 views::View* GetContentsView() override; | 86 views::View* GetContentsView() override; |
87 views::Widget* GetWidget() override; | 87 views::Widget* GetWidget() override; |
88 const views::Widget* GetWidget() const override; | 88 const views::Widget* GetWidget() const override; |
89 | 89 |
90 std::unique_ptr<shell::Connector> connector_; | 90 std::unique_ptr<service_manager::Connector> connector_; |
91 mojom::ViewClientPtr client_; | 91 mojom::ViewClientPtr client_; |
92 std::unique_ptr<shell::ServiceContextRef> ref_; | 92 std::unique_ptr<service_manager::ServiceContextRef> ref_; |
93 | 93 |
94 std::unique_ptr<ui::WindowTreeClient> window_tree_client_; | 94 std::unique_ptr<ui::WindowTreeClient> window_tree_client_; |
95 | 95 |
96 views::WebView* web_view_; | 96 views::WebView* web_view_; |
97 | 97 |
98 std::unique_ptr<content::WebContents> web_contents_; | 98 std::unique_ptr<content::WebContents> web_contents_; |
99 | 99 |
100 content::NotificationRegistrar registrar_; | 100 content::NotificationRegistrar registrar_; |
101 | 101 |
102 std::unique_ptr<views::Widget> widget_; | 102 std::unique_ptr<views::Widget> widget_; |
103 | 103 |
104 DISALLOW_COPY_AND_ASSIGN(ViewImpl); | 104 DISALLOW_COPY_AND_ASSIGN(ViewImpl); |
105 }; | 105 }; |
106 | 106 |
107 } // navigation | 107 } // navigation |
108 | 108 |
109 #endif // SERVICES_NAVIGATION_VIEW_IMPL_H_ | 109 #endif // SERVICES_NAVIGATION_VIEW_IMPL_H_ |
OLD | NEW |