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 #ifndef COMPONENTS_HTML_VIEWER_HTML_DOCUMENT_H_ | 5 #ifndef COMPONENTS_HTML_VIEWER_HTML_DOCUMENT_H_ |
6 #define COMPONENTS_HTML_VIEWER_HTML_DOCUMENT_H_ | 6 #define COMPONENTS_HTML_VIEWER_HTML_DOCUMENT_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 | 10 |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 const blink::WebString& source_name, | 105 const blink::WebString& source_name, |
106 unsigned source_line, | 106 unsigned source_line, |
107 const blink::WebString& stack_trace); | 107 const blink::WebString& stack_trace); |
108 virtual void didFinishLoad(blink::WebLocalFrame* frame); | 108 virtual void didFinishLoad(blink::WebLocalFrame* frame); |
109 virtual void didNavigateWithinPage(blink::WebLocalFrame* frame, | 109 virtual void didNavigateWithinPage(blink::WebLocalFrame* frame, |
110 const blink::WebHistoryItem& history_item, | 110 const blink::WebHistoryItem& history_item, |
111 blink::WebHistoryCommitType commit_type); | 111 blink::WebHistoryCommitType commit_type); |
112 virtual blink::WebEncryptedMediaClient* encryptedMediaClient(); | 112 virtual blink::WebEncryptedMediaClient* encryptedMediaClient(); |
113 | 113 |
114 // ViewManagerDelegate methods: | 114 // ViewManagerDelegate methods: |
115 void OnEmbed(mojo::View* root, | 115 void OnEmbed(mojo::View* root) override; |
116 mojo::InterfaceRequest<mojo::ServiceProvider> services, | |
117 mojo::ServiceProviderPtr exposed_services) override; | |
118 void OnViewManagerDestroyed(mojo::ViewManager* view_manager) override; | 116 void OnViewManagerDestroyed(mojo::ViewManager* view_manager) override; |
119 | 117 |
120 // ViewObserver methods: | 118 // ViewObserver methods: |
121 void OnViewBoundsChanged(mojo::View* view, | 119 void OnViewBoundsChanged(mojo::View* view, |
122 const mojo::Rect& old_bounds, | 120 const mojo::Rect& old_bounds, |
123 const mojo::Rect& new_bounds) override; | 121 const mojo::Rect& new_bounds) override; |
124 void OnViewViewportMetricsChanged( | 122 void OnViewViewportMetricsChanged( |
125 mojo::View* view, | 123 mojo::View* view, |
126 const mojo::ViewportMetrics& old_metrics, | 124 const mojo::ViewportMetrics& old_metrics, |
127 const mojo::ViewportMetrics& new_metrics) override; | 125 const mojo::ViewportMetrics& new_metrics) override; |
(...skipping 11 matching lines...) Expand all Loading... |
139 | 137 |
140 void Load(mojo::URLResponsePtr response); | 138 void Load(mojo::URLResponsePtr response); |
141 | 139 |
142 // Converts a WebLocalFrame to a WebRemoteFrame. Used once we know the | 140 // Converts a WebLocalFrame to a WebRemoteFrame. Used once we know the |
143 // url of a frame to trigger the navigation. | 141 // url of a frame to trigger the navigation. |
144 void ConvertLocalFrameToRemoteFrame(blink::WebLocalFrame* frame); | 142 void ConvertLocalFrameToRemoteFrame(blink::WebLocalFrame* frame); |
145 | 143 |
146 scoped_ptr<mojo::AppRefCount> app_refcount_; | 144 scoped_ptr<mojo::AppRefCount> app_refcount_; |
147 mojo::ApplicationImpl* html_document_app_; | 145 mojo::ApplicationImpl* html_document_app_; |
148 mojo::URLResponsePtr response_; | 146 mojo::URLResponsePtr response_; |
149 mojo::ServiceProviderPtr embedder_service_provider_; | |
150 mojo::ServiceProviderImpl embedder_exported_services_; | |
151 mojo::LazyInterfacePtr<mojo::NavigatorHost> navigator_host_; | 147 mojo::LazyInterfacePtr<mojo::NavigatorHost> navigator_host_; |
152 blink::WebView* web_view_; | 148 blink::WebView* web_view_; |
153 mojo::View* root_; | 149 mojo::View* root_; |
154 mojo::ViewManagerClientFactory view_manager_client_factory_; | 150 mojo::ViewManagerClientFactory view_manager_client_factory_; |
155 scoped_ptr<WebLayerTreeViewImpl> web_layer_tree_view_impl_; | 151 scoped_ptr<WebLayerTreeViewImpl> web_layer_tree_view_impl_; |
156 scoped_refptr<base::SingleThreadTaskRunner> compositor_thread_; | 152 scoped_refptr<base::SingleThreadTaskRunner> compositor_thread_; |
157 | 153 |
158 // HTMLDocument owns these pointers; binding requests after document load. | 154 // HTMLDocument owns these pointers; binding requests after document load. |
159 std::set<mojo::InterfaceRequest<mojo::AxProvider>*> ax_provider_requests_; | 155 std::set<mojo::InterfaceRequest<mojo::AxProvider>*> ax_provider_requests_; |
160 std::set<AxProviderImpl*> ax_providers_; | 156 std::set<AxProviderImpl*> ax_providers_; |
161 | 157 |
162 // A flag set on didFinishLoad. | 158 // A flag set on didFinishLoad. |
163 bool did_finish_load_ = false; | 159 bool did_finish_load_ = false; |
164 | 160 |
165 Setup* setup_; | 161 Setup* setup_; |
166 | 162 |
167 scoped_ptr<TouchHandler> touch_handler_; | 163 scoped_ptr<TouchHandler> touch_handler_; |
168 | 164 |
169 FrameToViewMap frame_to_view_; | 165 FrameToViewMap frame_to_view_; |
170 | 166 |
171 FrameTreeManager frame_tree_manager_; | 167 FrameTreeManager frame_tree_manager_; |
172 mojo::Binding<mandoline::FrameTreeClient> frame_tree_manager_binding_; | 168 mojo::Binding<mandoline::FrameTreeClient> frame_tree_manager_binding_; |
173 | 169 |
174 DISALLOW_COPY_AND_ASSIGN(HTMLDocument); | 170 DISALLOW_COPY_AND_ASSIGN(HTMLDocument); |
175 }; | 171 }; |
176 | 172 |
177 } // namespace html_viewer | 173 } // namespace html_viewer |
178 | 174 |
179 #endif // COMPONENTS_HTML_VIEWER_HTML_DOCUMENT_H_ | 175 #endif // COMPONENTS_HTML_VIEWER_HTML_DOCUMENT_H_ |
OLD | NEW |