| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ |
| 6 #define CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ | 6 #define CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ |
| 7 | 7 |
| 8 #include <deque> | 8 #include <deque> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 public RenderView, | 159 public RenderView, |
| 160 public base::SupportsWeakPtr<RenderViewImpl> { | 160 public base::SupportsWeakPtr<RenderViewImpl> { |
| 161 public: | 161 public: |
| 162 // Creates a new RenderView. |opener_id| is the routing ID of the RenderView | 162 // Creates a new RenderView. |opener_id| is the routing ID of the RenderView |
| 163 // responsible for creating this RenderView. Note that if the original opener | 163 // responsible for creating this RenderView. Note that if the original opener |
| 164 // has been closed, |window_was_created_with_opener| will be true and | 164 // has been closed, |window_was_created_with_opener| will be true and |
| 165 // |opener_id| will be MSG_ROUTING_NONE. When |swapped_out| is true, the | 165 // |opener_id| will be MSG_ROUTING_NONE. When |swapped_out| is true, the |
| 166 // |proxy_routing_id| is specified, so a RenderFrameProxy can be created for | 166 // |proxy_routing_id| is specified, so a RenderFrameProxy can be created for |
| 167 // this RenderView's main RenderFrame. | 167 // this RenderView's main RenderFrame. |
| 168 static RenderViewImpl* Create(const ViewMsg_New_Params& params, | 168 static RenderViewImpl* Create(const ViewMsg_New_Params& params, |
| 169 CompositorDependencies* compositor_deps, |
| 169 bool was_created_by_renderer); | 170 bool was_created_by_renderer); |
| 170 | 171 |
| 171 // Used by content_layouttest_support to hook into the creation of | 172 // Used by content_layouttest_support to hook into the creation of |
| 172 // RenderViewImpls. | 173 // RenderViewImpls. |
| 173 static void InstallCreateHook( | 174 static void InstallCreateHook( |
| 174 RenderViewImpl* (*create_render_view_impl)(const ViewMsg_New_Params&)); | 175 RenderViewImpl* (*create_render_view_impl)(const ViewMsg_New_Params&)); |
| 175 | 176 |
| 176 // Returns the RenderViewImpl containing the given WebView. | 177 // Returns the RenderViewImpl containing the given WebView. |
| 177 static RenderViewImpl* FromWebView(blink::WebView* webview); | 178 static RenderViewImpl* FromWebView(blink::WebView* webview); |
| 178 | 179 |
| (...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 515 void DidCommitCompositorFrame() override; | 516 void DidCommitCompositorFrame() override; |
| 516 void InstrumentWillBeginFrame(int frame_id) override; | 517 void InstrumentWillBeginFrame(int frame_id) override; |
| 517 void InstrumentDidBeginFrame() override; | 518 void InstrumentDidBeginFrame() override; |
| 518 void InstrumentDidCancelFrame() override; | 519 void InstrumentDidCancelFrame() override; |
| 519 void InstrumentWillComposite() override; | 520 void InstrumentWillComposite() override; |
| 520 | 521 |
| 521 protected: | 522 protected: |
| 522 explicit RenderViewImpl(const ViewMsg_New_Params& params); | 523 explicit RenderViewImpl(const ViewMsg_New_Params& params); |
| 523 | 524 |
| 524 void Initialize(const ViewMsg_New_Params& params, | 525 void Initialize(const ViewMsg_New_Params& params, |
| 526 CompositorDependencies* compositor_deps, |
| 525 bool was_created_by_renderer); | 527 bool was_created_by_renderer); |
| 526 void SetScreenMetricsEmulationParameters(float device_scale_factor, | 528 void SetScreenMetricsEmulationParameters(float device_scale_factor, |
| 527 const gfx::Point& root_layer_offset, | 529 const gfx::Point& root_layer_offset, |
| 528 float root_layer_scale) override; | 530 float root_layer_scale) override; |
| 529 | 531 |
| 530 // Do not delete directly. This class is reference counted. | 532 // Do not delete directly. This class is reference counted. |
| 531 virtual ~RenderViewImpl(); | 533 virtual ~RenderViewImpl(); |
| 532 | 534 |
| 533 private: | 535 private: |
| 534 // For unit tests. | 536 // For unit tests. |
| (...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1073 // use the Observer interface to filter IPC messages and receive frame change | 1075 // use the Observer interface to filter IPC messages and receive frame change |
| 1074 // notifications. | 1076 // notifications. |
| 1075 // --------------------------------------------------------------------------- | 1077 // --------------------------------------------------------------------------- |
| 1076 | 1078 |
| 1077 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl); | 1079 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl); |
| 1078 }; | 1080 }; |
| 1079 | 1081 |
| 1080 } // namespace content | 1082 } // namespace content |
| 1081 | 1083 |
| 1082 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ | 1084 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ |
| OLD | NEW |