| 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 COMPONENTS_WEB_VIEW_WEB_VIEW_IMPL_H_ | 5 #ifndef COMPONENTS_WEB_VIEW_WEB_VIEW_IMPL_H_ |
| 6 #define COMPONENTS_WEB_VIEW_WEB_VIEW_IMPL_H_ | 6 #define COMPONENTS_WEB_VIEW_WEB_VIEW_IMPL_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "components/mus/public/cpp/view_observer.h" | 10 #include "components/mus/public/cpp/view_observer.h" |
| 11 #include "components/mus/public/cpp/view_tree_delegate.h" | 11 #include "components/mus/public/cpp/view_tree_delegate.h" |
| 12 #include "components/web_view/frame_devtools_agent_delegate.h" | 12 #include "components/web_view/frame_devtools_agent_delegate.h" |
| 13 #include "components/web_view/frame_tree_delegate.h" | 13 #include "components/web_view/frame_tree_delegate.h" |
| 14 #include "components/web_view/navigation_controller.h" | 14 #include "components/web_view/navigation_controller.h" |
| 15 #include "components/web_view/navigation_controller_delegate.h" | 15 #include "components/web_view/navigation_controller_delegate.h" |
| 16 #include "components/web_view/public/interfaces/web_view.mojom.h" | 16 #include "components/web_view/public/interfaces/web_view.mojom.h" |
| 17 #include "third_party/mojo/src/mojo/public/cpp/bindings/strong_binding.h" | 17 #include "third_party/mojo/src/mojo/public/cpp/bindings/strong_binding.h" |
| 18 | 18 |
| 19 namespace mojo { | 19 namespace mojo { |
| 20 class ApplicationImpl; | 20 class ApplicationImpl; |
| 21 } | 21 } |
| 22 | 22 |
| 23 namespace web_view { | 23 namespace web_view { |
| 24 | 24 |
| 25 class Frame; | 25 class Frame; |
| 26 class FrameDevToolsAgent; | 26 class FrameDevToolsAgent; |
| 27 class FrameTree; | 27 class FrameTree; |
| 28 class HTMLMessageEvent; | |
| 29 class PendingWebViewLoad; | 28 class PendingWebViewLoad; |
| 30 class URLRequestCloneable; | 29 class URLRequestCloneable; |
| 31 | 30 |
| 31 namespace mojom { |
| 32 class HTMLMessageEvent; |
| 33 } |
| 34 |
| 32 class WebViewImpl : public mojom::WebView, | 35 class WebViewImpl : public mojom::WebView, |
| 33 public mus::ViewTreeDelegate, | 36 public mus::ViewTreeDelegate, |
| 34 public mus::ViewObserver, | 37 public mus::ViewObserver, |
| 35 public FrameTreeDelegate, | 38 public FrameTreeDelegate, |
| 36 public FrameDevToolsAgentDelegate, | 39 public FrameDevToolsAgentDelegate, |
| 37 public NavigationControllerDelegate { | 40 public NavigationControllerDelegate { |
| 38 public: | 41 public: |
| 39 WebViewImpl(mojo::ApplicationImpl* app, | 42 WebViewImpl(mojo::ApplicationImpl* app, |
| 40 mojom::WebViewClientPtr client, | 43 mojom::WebViewClientPtr client, |
| 41 mojo::InterfaceRequest<WebView> request); | 44 mojo::InterfaceRequest<WebView> request); |
| (...skipping 18 matching lines...) Expand all Loading... |
| 60 void OnConnectionLost(mus::ViewTreeConnection* connection) override; | 63 void OnConnectionLost(mus::ViewTreeConnection* connection) override; |
| 61 | 64 |
| 62 // Overridden from mus::ViewObserver: | 65 // Overridden from mus::ViewObserver: |
| 63 void OnViewBoundsChanged(mus::View* view, | 66 void OnViewBoundsChanged(mus::View* view, |
| 64 const mojo::Rect& old_bounds, | 67 const mojo::Rect& old_bounds, |
| 65 const mojo::Rect& new_bounds) override; | 68 const mojo::Rect& new_bounds) override; |
| 66 void OnViewDestroyed(mus::View* view) override; | 69 void OnViewDestroyed(mus::View* view) override; |
| 67 | 70 |
| 68 // Overridden from FrameTreeDelegate: | 71 // Overridden from FrameTreeDelegate: |
| 69 scoped_ptr<FrameUserData> CreateUserDataForNewFrame( | 72 scoped_ptr<FrameUserData> CreateUserDataForNewFrame( |
| 70 FrameTreeClientPtr frame_tree_client) override; | 73 mojom::FrameClientPtr frame_client) override; |
| 71 bool CanPostMessageEventToFrame(const Frame* source, | 74 bool CanPostMessageEventToFrame(const Frame* source, |
| 72 const Frame* target, | 75 const Frame* target, |
| 73 HTMLMessageEvent* event) override; | 76 mojom::HTMLMessageEvent* event) override; |
| 74 void LoadingStateChanged(bool loading, double progress) override; | 77 void LoadingStateChanged(bool loading, double progress) override; |
| 75 void TitleChanged(const mojo::String& title) override; | 78 void TitleChanged(const mojo::String& title) override; |
| 76 void NavigateTopLevel(Frame* source, mojo::URLRequestPtr request) override; | 79 void NavigateTopLevel(Frame* source, mojo::URLRequestPtr request) override; |
| 77 void CanNavigateFrame(Frame* target, | 80 void CanNavigateFrame(Frame* target, |
| 78 mojo::URLRequestPtr request, | 81 mojo::URLRequestPtr request, |
| 79 const CanNavigateFrameCallback& callback) override; | 82 const CanNavigateFrameCallback& callback) override; |
| 80 void DidStartNavigation(Frame* frame) override; | 83 void DidStartNavigation(Frame* frame) override; |
| 81 void DidCommitProvisionalLoad(Frame* frame) override; | 84 void DidCommitProvisionalLoad(Frame* frame) override; |
| 82 | 85 |
| 83 // Overridden from FrameDevToolsAgent::Delegate: | 86 // Overridden from FrameDevToolsAgent::Delegate: |
| (...skipping 18 matching lines...) Expand all Loading... |
| 102 scoped_ptr<FrameDevToolsAgent> devtools_agent_; | 105 scoped_ptr<FrameDevToolsAgent> devtools_agent_; |
| 103 | 106 |
| 104 NavigationController navigation_controller_; | 107 NavigationController navigation_controller_; |
| 105 | 108 |
| 106 DISALLOW_COPY_AND_ASSIGN(WebViewImpl); | 109 DISALLOW_COPY_AND_ASSIGN(WebViewImpl); |
| 107 }; | 110 }; |
| 108 | 111 |
| 109 } // namespace web_view | 112 } // namespace web_view |
| 110 | 113 |
| 111 #endif // COMPONENTS_WEB_VIEW_WEB_VIEW_IMPL_H_ | 114 #endif // COMPONENTS_WEB_VIEW_WEB_VIEW_IMPL_H_ |
| OLD | NEW |