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 "cc/layers/surface_layer.h" |
12 #include "components/html_viewer/html_frame_tree_manager.h" | 13 #include "components/html_viewer/html_frame_tree_manager.h" |
13 #include "components/html_viewer/replicated_frame_state.h" | 14 #include "components/html_viewer/replicated_frame_state.h" |
14 #include "components/mus/public/cpp/view_observer.h" | 15 #include "components/mus/public/cpp/view_observer.h" |
15 #include "components/web_view/public/interfaces/frame.mojom.h" | 16 #include "components/web_view/public/interfaces/frame.mojom.h" |
16 #include "mojo/services/tracing/public/interfaces/tracing.mojom.h" | 17 #include "mojo/services/tracing/public/interfaces/tracing.mojom.h" |
17 #include "third_party/WebKit/public/platform/WebURLRequest.h" | 18 #include "third_party/WebKit/public/platform/WebURLRequest.h" |
18 #include "third_party/WebKit/public/web/WebFrameClient.h" | 19 #include "third_party/WebKit/public/web/WebFrameClient.h" |
19 #include "third_party/WebKit/public/web/WebRemoteFrameClient.h" | 20 #include "third_party/WebKit/public/web/WebRemoteFrameClient.h" |
20 #include "third_party/WebKit/public/web/WebSandboxFlags.h" | 21 #include "third_party/WebKit/public/web/WebSandboxFlags.h" |
21 #include "third_party/WebKit/public/web/WebTextInputInfo.h" | 22 #include "third_party/WebKit/public/web/WebTextInputInfo.h" |
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 virtual void frameDetached(blink::WebRemoteFrameClient::DetachType type); | 282 virtual void frameDetached(blink::WebRemoteFrameClient::DetachType type); |
282 virtual void postMessageEvent(blink::WebLocalFrame* source_web_frame, | 283 virtual void postMessageEvent(blink::WebLocalFrame* source_web_frame, |
283 blink::WebRemoteFrame* target_web_frame, | 284 blink::WebRemoteFrame* target_web_frame, |
284 blink::WebSecurityOrigin target_origin, | 285 blink::WebSecurityOrigin target_origin, |
285 blink::WebDOMMessageEvent event); | 286 blink::WebDOMMessageEvent event); |
286 virtual void initializeChildFrame(const blink::WebRect& frame_rect, | 287 virtual void initializeChildFrame(const blink::WebRect& frame_rect, |
287 float scale_factor); | 288 float scale_factor); |
288 virtual void navigate(const blink::WebURLRequest& request, | 289 virtual void navigate(const blink::WebURLRequest& request, |
289 bool should_replace_current_entry); | 290 bool should_replace_current_entry); |
290 virtual void reload(bool ignore_cache, bool is_client_redirect); | 291 virtual void reload(bool ignore_cache, bool is_client_redirect); |
291 virtual void forwardInputEvent(const blink::WebInputEvent* event); | 292 virtual void frameRectsChanged(const blink::WebRect& frame_rect); |
292 | 293 |
293 HTMLFrameTreeManager* frame_tree_manager_; | 294 HTMLFrameTreeManager* frame_tree_manager_; |
294 HTMLFrame* parent_; | 295 HTMLFrame* parent_; |
295 // |view_| is non-null for local frames or remote frames that were once | 296 // |view_| is non-null for local frames or remote frames that were once |
296 // local. | 297 // local. |
297 mus::View* view_; | 298 mus::View* view_; |
298 // The id for this frame. If there is a view, this is the same id as the | 299 // The id for this frame. If there is a view, this is the same id as the |
299 // view has. | 300 // view has. |
300 const uint32_t id_; | 301 const uint32_t id_; |
301 std::vector<HTMLFrame*> children_; | 302 std::vector<HTMLFrame*> children_; |
302 blink::WebFrame* web_frame_; | 303 blink::WebFrame* web_frame_; |
303 scoped_ptr<HTMLWidget> html_widget_; | 304 scoped_ptr<HTMLWidget> html_widget_; |
304 scoped_ptr<GeolocationClientImpl> geolocation_client_impl_; | 305 scoped_ptr<GeolocationClientImpl> geolocation_client_impl_; |
305 scoped_ptr<TouchHandler> touch_handler_; | 306 scoped_ptr<TouchHandler> touch_handler_; |
306 | 307 |
307 scoped_ptr<cc_blink::WebLayerImpl> web_layer_; | 308 scoped_ptr<cc_blink::WebLayerImpl> web_layer_; |
| 309 scoped_refptr<cc::SurfaceLayer> surface_layer_; |
308 | 310 |
309 HTMLFrameDelegate* delegate_; | 311 HTMLFrameDelegate* delegate_; |
310 scoped_ptr<mojo::Binding<web_view::mojom::FrameClient>> frame_client_binding_; | 312 scoped_ptr<mojo::Binding<web_view::mojom::FrameClient>> frame_client_binding_; |
311 web_view::mojom::FramePtr server_; | 313 web_view::mojom::FramePtr server_; |
312 | 314 |
313 ReplicatedFrameState state_; | 315 ReplicatedFrameState state_; |
314 | 316 |
315 // If this frame is the result of creating a local frame | 317 // If this frame is the result of creating a local frame |
316 // (createChildFrame()), then |owned_view_| is the View initially created | 318 // (createChildFrame()), then |owned_view_| is the View initially created |
317 // for the frame. While the frame is local |owned_view_| is the same as | 319 // for the frame. While the frame is local |owned_view_| is the same as |
(...skipping 13 matching lines...) Expand all Loading... |
331 scoped_ptr<DevToolsAgentImpl> devtools_agent_; | 333 scoped_ptr<DevToolsAgentImpl> devtools_agent_; |
332 | 334 |
333 base::WeakPtrFactory<HTMLFrame> weak_factory_; | 335 base::WeakPtrFactory<HTMLFrame> weak_factory_; |
334 | 336 |
335 DISALLOW_COPY_AND_ASSIGN(HTMLFrame); | 337 DISALLOW_COPY_AND_ASSIGN(HTMLFrame); |
336 }; | 338 }; |
337 | 339 |
338 } // namespace html_viewer | 340 } // namespace html_viewer |
339 | 341 |
340 #endif // COMPONENTS_HTML_VIEWER_HTML_FRAME_H_ | 342 #endif // COMPONENTS_HTML_VIEWER_HTML_FRAME_H_ |
OLD | NEW |