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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 virtual blink::WebFrame* createChildFrame( | 162 virtual blink::WebFrame* createChildFrame( |
161 blink::WebLocalFrame* parent, | 163 blink::WebLocalFrame* parent, |
162 blink::WebTreeScopeType scope, | 164 blink::WebTreeScopeType scope, |
163 const blink::WebString& frame_ame, | 165 const blink::WebString& frame_ame, |
164 blink::WebSandboxFlags sandbox_flags); | 166 blink::WebSandboxFlags sandbox_flags); |
165 virtual void frameDetached(blink::WebFrame* frame, | 167 virtual void frameDetached(blink::WebFrame* frame, |
166 blink::WebFrameClient::DetachType type); | 168 blink::WebFrameClient::DetachType type); |
167 virtual blink::WebCookieJar* cookieJar(blink::WebLocalFrame* frame); | 169 virtual blink::WebCookieJar* cookieJar(blink::WebLocalFrame* frame); |
168 virtual blink::WebNavigationPolicy decidePolicyForNavigation( | 170 virtual blink::WebNavigationPolicy decidePolicyForNavigation( |
169 const NavigationPolicyInfo& info); | 171 const NavigationPolicyInfo& info); |
| 172 virtual void didHandleOnloadEvents(blink::WebLocalFrame* frame); |
170 virtual void didAddMessageToConsole(const blink::WebConsoleMessage& message, | 173 virtual void didAddMessageToConsole(const blink::WebConsoleMessage& message, |
171 const blink::WebString& source_name, | 174 const blink::WebString& source_name, |
172 unsigned source_line, | 175 unsigned source_line, |
173 const blink::WebString& stack_trace); | 176 const blink::WebString& stack_trace); |
174 virtual void didFinishLoad(blink::WebLocalFrame* frame); | 177 virtual void didFinishLoad(blink::WebLocalFrame* frame); |
175 virtual void didNavigateWithinPage(blink::WebLocalFrame* frame, | 178 virtual void didNavigateWithinPage(blink::WebLocalFrame* frame, |
176 const blink::WebHistoryItem& history_item, | 179 const blink::WebHistoryItem& history_item, |
177 blink::WebHistoryCommitType commit_type); | 180 blink::WebHistoryCommitType commit_type); |
| 181 virtual void didFirstVisuallyNonEmptyLayout(blink::WebLocalFrame* frame); |
178 virtual blink::WebGeolocationClient* geolocationClient(); | 182 virtual blink::WebGeolocationClient* geolocationClient(); |
179 virtual blink::WebEncryptedMediaClient* encryptedMediaClient(); | 183 virtual blink::WebEncryptedMediaClient* encryptedMediaClient(); |
180 virtual void didStartLoading(bool to_different_document); | 184 virtual void didStartLoading(bool to_different_document); |
181 virtual void didStopLoading(); | 185 virtual void didStopLoading(); |
182 virtual void didChangeLoadProgress(double load_progress); | 186 virtual void didChangeLoadProgress(double load_progress); |
183 virtual void didChangeName(blink::WebLocalFrame* frame, | 187 virtual void didChangeName(blink::WebLocalFrame* frame, |
184 const blink::WebString& name); | 188 const blink::WebString& name); |
185 virtual void didCommitProvisionalLoad( | 189 virtual void didCommitProvisionalLoad( |
186 blink::WebLocalFrame* frame, | 190 blink::WebLocalFrame* frame, |
187 const blink::WebHistoryItem& item, | 191 const blink::WebHistoryItem& item, |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
318 // |owned_view_| remains as the View initially created for the frame. | 322 // |owned_view_| remains as the View initially created for the frame. |
319 // | 323 // |
320 // This is done to ensure the View isn't prematurely deleted (it must exist | 324 // This is done to ensure the View isn't prematurely deleted (it must exist |
321 // as long as the frame is valid). If the View was deleted as soon as the | 325 // as long as the frame is valid). If the View was deleted as soon as the |
322 // frame was swapped to remote then the process rendering to the view would | 326 // frame was swapped to remote then the process rendering to the view would |
323 // be severed. | 327 // be severed. |
324 scoped_ptr<mojo::ScopedViewPtr> owned_view_; | 328 scoped_ptr<mojo::ScopedViewPtr> owned_view_; |
325 | 329 |
326 blink::WebTextInputInfo text_input_info_; | 330 blink::WebTextInputInfo text_input_info_; |
327 | 331 |
| 332 // This object is only valid in the context of performance tests. |
| 333 tracing::StartupPerformanceDataCollectorPtr |
| 334 startup_performance_data_collector_; |
| 335 |
328 base::WeakPtrFactory<HTMLFrame> weak_factory_; | 336 base::WeakPtrFactory<HTMLFrame> weak_factory_; |
329 | 337 |
330 DISALLOW_COPY_AND_ASSIGN(HTMLFrame); | 338 DISALLOW_COPY_AND_ASSIGN(HTMLFrame); |
331 }; | 339 }; |
332 | 340 |
333 } // namespace html_viewer | 341 } // namespace html_viewer |
334 | 342 |
335 #endif // COMPONENTS_HTML_VIEWER_HTML_FRAME_H_ | 343 #endif // COMPONENTS_HTML_VIEWER_HTML_FRAME_H_ |
OLD | NEW |