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_HTML_VIEWER_HTML_FRAME_H_ | 5 #ifndef COMPONENTS_HTML_VIEWER_HTML_FRAME_H_ |
6 #define COMPONENTS_HTML_VIEWER_HTML_FRAME_H_ | 6 #define COMPONENTS_HTML_VIEWER_HTML_FRAME_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #include "components/html_viewer/html_frame_tree_manager.h" | 12 #include "components/html_viewer/html_frame_tree_manager.h" |
13 #include "components/html_viewer/replicated_frame_state.h" | 13 #include "components/html_viewer/replicated_frame_state.h" |
14 #include "components/view_manager/public/cpp/view_observer.h" | 14 #include "components/view_manager/public/cpp/view_observer.h" |
15 #include "mandoline/tab/public/interfaces/frame_tree.mojom.h" | 15 #include "mandoline/tab/public/interfaces/frame_tree.mojom.h" |
| 16 #include "mojo/services/tracing/public/interfaces/tracing.mojom.h" |
16 #include "third_party/WebKit/public/platform/WebURLRequest.h" | 17 #include "third_party/WebKit/public/platform/WebURLRequest.h" |
17 #include "third_party/WebKit/public/web/WebFrameClient.h" | 18 #include "third_party/WebKit/public/web/WebFrameClient.h" |
18 #include "third_party/WebKit/public/web/WebRemoteFrameClient.h" | 19 #include "third_party/WebKit/public/web/WebRemoteFrameClient.h" |
19 #include "third_party/WebKit/public/web/WebSandboxFlags.h" | 20 #include "third_party/WebKit/public/web/WebSandboxFlags.h" |
20 #include "third_party/WebKit/public/web/WebTextInputInfo.h" | 21 #include "third_party/WebKit/public/web/WebTextInputInfo.h" |
21 #include "third_party/WebKit/public/web/WebViewClient.h" | 22 #include "third_party/WebKit/public/web/WebViewClient.h" |
22 | 23 |
23 namespace blink { | 24 namespace blink { |
24 class WebFrame; | 25 class WebFrame; |
25 } | 26 } |
26 | 27 |
27 namespace mojo { | 28 namespace mojo { |
| 29 class ApplicationImpl; |
28 class Rect; | 30 class Rect; |
29 class ScopedViewPtr; | 31 class ScopedViewPtr; |
30 class View; | 32 class View; |
31 } | 33 } |
32 | 34 |
33 namespace html_viewer { | 35 namespace html_viewer { |
34 | 36 |
35 class GeolocationClientImpl; | 37 class GeolocationClientImpl; |
36 class HTMLFrameDelegate; | 38 class HTMLFrameDelegate; |
37 class HTMLFrameTreeManager; | 39 class HTMLFrameTreeManager; |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 blink::WebSandboxFlags sandbox_flags); | 233 blink::WebSandboxFlags sandbox_flags); |
232 virtual void frameDetached(blink::WebFrame* frame, | 234 virtual void frameDetached(blink::WebFrame* frame, |
233 blink::WebFrameClient::DetachType type); | 235 blink::WebFrameClient::DetachType type); |
234 virtual blink::WebCookieJar* cookieJar(blink::WebLocalFrame* frame); | 236 virtual blink::WebCookieJar* cookieJar(blink::WebLocalFrame* frame); |
235 virtual blink::WebNavigationPolicy decidePolicyForNavigation( | 237 virtual blink::WebNavigationPolicy decidePolicyForNavigation( |
236 const NavigationPolicyInfo& info); | 238 const NavigationPolicyInfo& info); |
237 virtual void didAddMessageToConsole(const blink::WebConsoleMessage& message, | 239 virtual void didAddMessageToConsole(const blink::WebConsoleMessage& message, |
238 const blink::WebString& source_name, | 240 const blink::WebString& source_name, |
239 unsigned source_line, | 241 unsigned source_line, |
240 const blink::WebString& stack_trace); | 242 const blink::WebString& stack_trace); |
| 243 virtual void didHandleOnloadEvents(blink::WebLocalFrame* frame); |
241 virtual void didFinishLoad(blink::WebLocalFrame* frame); | 244 virtual void didFinishLoad(blink::WebLocalFrame* frame); |
242 virtual void didNavigateWithinPage(blink::WebLocalFrame* frame, | 245 virtual void didNavigateWithinPage(blink::WebLocalFrame* frame, |
243 const blink::WebHistoryItem& history_item, | 246 const blink::WebHistoryItem& history_item, |
244 blink::WebHistoryCommitType commit_type); | 247 blink::WebHistoryCommitType commit_type); |
| 248 virtual void didFirstVisuallyNonEmptyLayout(blink::WebLocalFrame* frame); |
245 virtual blink::WebGeolocationClient* geolocationClient(); | 249 virtual blink::WebGeolocationClient* geolocationClient(); |
246 virtual blink::WebEncryptedMediaClient* encryptedMediaClient(); | 250 virtual blink::WebEncryptedMediaClient* encryptedMediaClient(); |
247 virtual void didStartLoading(bool to_different_document); | 251 virtual void didStartLoading(bool to_different_document); |
248 virtual void didStopLoading(); | 252 virtual void didStopLoading(); |
249 virtual void didChangeLoadProgress(double load_progress); | 253 virtual void didChangeLoadProgress(double load_progress); |
250 virtual void didChangeName(blink::WebLocalFrame* frame, | 254 virtual void didChangeName(blink::WebLocalFrame* frame, |
251 const blink::WebString& name); | 255 const blink::WebString& name); |
252 virtual void didCommitProvisionalLoad( | 256 virtual void didCommitProvisionalLoad( |
253 blink::WebLocalFrame* frame, | 257 blink::WebLocalFrame* frame, |
254 const blink::WebHistoryItem& item, | 258 const blink::WebHistoryItem& item, |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
298 // |owned_view_| remains as the View initially created for the frame. | 302 // |owned_view_| remains as the View initially created for the frame. |
299 // | 303 // |
300 // This is done to ensure the View isn't prematurely deleted (it must exist | 304 // This is done to ensure the View isn't prematurely deleted (it must exist |
301 // as long as the frame is valid). If the View was deleted as soon as the | 305 // as long as the frame is valid). If the View was deleted as soon as the |
302 // frame was swapped to remote then the process rendering to the view would | 306 // frame was swapped to remote then the process rendering to the view would |
303 // be severed. | 307 // be severed. |
304 scoped_ptr<mojo::ScopedViewPtr> owned_view_; | 308 scoped_ptr<mojo::ScopedViewPtr> owned_view_; |
305 | 309 |
306 blink::WebTextInputInfo text_input_info_; | 310 blink::WebTextInputInfo text_input_info_; |
307 | 311 |
| 312 // This object is only valid in the context of performance tests. |
| 313 tracing::StartupPerformanceDataCollectorPtr |
| 314 startup_performance_data_collector_; |
| 315 |
308 base::WeakPtrFactory<HTMLFrame> weak_factory_; | 316 base::WeakPtrFactory<HTMLFrame> weak_factory_; |
309 | 317 |
310 DISALLOW_COPY_AND_ASSIGN(HTMLFrame); | 318 DISALLOW_COPY_AND_ASSIGN(HTMLFrame); |
311 }; | 319 }; |
312 | 320 |
313 } // namespace html_viewer | 321 } // namespace html_viewer |
314 | 322 |
315 #endif // COMPONENTS_HTML_VIEWER_HTML_FRAME_H_ | 323 #endif // COMPONENTS_HTML_VIEWER_HTML_FRAME_H_ |
OLD | NEW |