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 <set> | 8 #include <set> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
12 #include "components/html_viewer/ax_provider_impl.h" | 12 #include "components/html_viewer/ax_provider_impl.h" |
13 #include "components/html_viewer/touch_handler.h" | 13 #include "components/html_viewer/touch_handler.h" |
14 #include "components/view_manager/public/cpp/view_manager_client_factory.h" | 14 #include "components/view_manager/public/cpp/view_manager_client_factory.h" |
15 #include "components/view_manager/public/cpp/view_manager_delegate.h" | 15 #include "components/view_manager/public/cpp/view_manager_delegate.h" |
16 #include "components/view_manager/public/cpp/view_observer.h" | 16 #include "components/view_manager/public/cpp/view_observer.h" |
17 #include "mandoline/services/navigation/public/interfaces/navigation.mojom.h" | 17 #include "mandoline/services/navigation/public/interfaces/navigation.mojom.h" |
18 #include "mojo/application/public/cpp/app_lifetime_helper.h" | 18 #include "mojo/application/public/cpp/app_lifetime_helper.h" |
19 #include "mojo/application/public/cpp/interface_factory.h" | 19 #include "mojo/application/public/cpp/interface_factory.h" |
20 #include "mojo/application/public/cpp/lazy_interface_ptr.h" | 20 #include "mojo/application/public/cpp/lazy_interface_ptr.h" |
21 #include "mojo/application/public/cpp/service_provider_impl.h" | 21 #include "mojo/application/public/cpp/service_provider_impl.h" |
22 #include "mojo/application/public/interfaces/application.mojom.h" | 22 #include "mojo/application/public/interfaces/application.mojom.h" |
23 #include "mojo/application/public/interfaces/content_handler.mojom.h" | 23 #include "mojo/application/public/interfaces/content_handler.mojom.h" |
24 #include "mojo/services/network/public/interfaces/url_loader.mojom.h" | 24 #include "mojo/services/network/public/interfaces/url_loader.mojom.h" |
| 25 #include "mojo/services/tracing/public/interfaces/tracing.mojom.h" |
25 #include "third_party/WebKit/public/web/WebFrameClient.h" | 26 #include "third_party/WebKit/public/web/WebFrameClient.h" |
26 #include "third_party/WebKit/public/web/WebSandboxFlags.h" | 27 #include "third_party/WebKit/public/web/WebSandboxFlags.h" |
27 #include "third_party/WebKit/public/web/WebViewClient.h" | 28 #include "third_party/WebKit/public/web/WebViewClient.h" |
28 | 29 |
29 namespace base { | 30 namespace base { |
30 class SingleThreadTaskRunner; | 31 class SingleThreadTaskRunner; |
31 } | 32 } |
32 | 33 |
33 namespace mojo { | 34 namespace mojo { |
34 class ViewManager; | 35 class ViewManager; |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 virtual void frameDetached(blink::WebFrame* frame, DetachType type); | 108 virtual void frameDetached(blink::WebFrame* frame, DetachType type); |
108 virtual blink::WebCookieJar* cookieJar(blink::WebLocalFrame* frame); | 109 virtual blink::WebCookieJar* cookieJar(blink::WebLocalFrame* frame); |
109 virtual blink::WebNavigationPolicy decidePolicyForNavigation( | 110 virtual blink::WebNavigationPolicy decidePolicyForNavigation( |
110 const NavigationPolicyInfo& info); | 111 const NavigationPolicyInfo& info); |
111 virtual blink::WebGeolocationClient* geolocationClient(); | 112 virtual blink::WebGeolocationClient* geolocationClient(); |
112 | 113 |
113 virtual void didAddMessageToConsole(const blink::WebConsoleMessage& message, | 114 virtual void didAddMessageToConsole(const blink::WebConsoleMessage& message, |
114 const blink::WebString& source_name, | 115 const blink::WebString& source_name, |
115 unsigned source_line, | 116 unsigned source_line, |
116 const blink::WebString& stack_trace); | 117 const blink::WebString& stack_trace); |
| 118 virtual void didHandleOnloadEvents(blink::WebLocalFrame* frame); |
117 virtual void didFinishLoad(blink::WebLocalFrame* frame); | 119 virtual void didFinishLoad(blink::WebLocalFrame* frame); |
118 virtual void didNavigateWithinPage(blink::WebLocalFrame* frame, | 120 virtual void didNavigateWithinPage(blink::WebLocalFrame* frame, |
119 const blink::WebHistoryItem& history_item, | 121 const blink::WebHistoryItem& history_item, |
120 blink::WebHistoryCommitType commit_type); | 122 blink::WebHistoryCommitType commit_type); |
| 123 virtual void didFirstVisuallyNonEmptyLayout(blink::WebLocalFrame* frame); |
121 virtual blink::WebEncryptedMediaClient* encryptedMediaClient(); | 124 virtual blink::WebEncryptedMediaClient* encryptedMediaClient(); |
122 | 125 |
123 private: | 126 private: |
124 // Data associated with a child iframe. | 127 // Data associated with a child iframe. |
125 struct ChildFrameData { | 128 struct ChildFrameData { |
126 mojo::View* view; | 129 mojo::View* view; |
127 blink::WebTreeScopeType scope; | 130 blink::WebTreeScopeType scope; |
128 }; | 131 }; |
129 | 132 |
130 // Updates the size and scale factor of the webview and related classes from | 133 // Updates the size and scale factor of the webview and related classes from |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 bool did_finish_load_ = false; | 185 bool did_finish_load_ = false; |
183 | 186 |
184 GlobalState* global_state_; | 187 GlobalState* global_state_; |
185 | 188 |
186 scoped_ptr<TouchHandler> touch_handler_; | 189 scoped_ptr<TouchHandler> touch_handler_; |
187 | 190 |
188 scoped_ptr<DevToolsAgentImpl> devtools_agent_; | 191 scoped_ptr<DevToolsAgentImpl> devtools_agent_; |
189 | 192 |
190 DeleteCallback delete_callback_; | 193 DeleteCallback delete_callback_; |
191 | 194 |
| 195 // This object is only valid in the context of performance tests. |
| 196 tracing::StartupPerformanceDataCollectorPtr |
| 197 startup_performance_data_collector_; |
| 198 |
192 DISALLOW_COPY_AND_ASSIGN(HTMLDocument); | 199 DISALLOW_COPY_AND_ASSIGN(HTMLDocument); |
193 }; | 200 }; |
194 | 201 |
195 } // namespace html_viewer | 202 } // namespace html_viewer |
196 | 203 |
197 #endif // COMPONENTS_HTML_VIEWER_HTML_DOCUMENT_H_ | 204 #endif // COMPONENTS_HTML_VIEWER_HTML_DOCUMENT_H_ |
OLD | NEW |