| 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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 NON_EXPORTED_BASE(public blink::WebPageSerializerClient), | 154 NON_EXPORTED_BASE(public blink::WebPageSerializerClient), |
| 155 public RenderView, | 155 public RenderView, |
| 156 public base::SupportsWeakPtr<RenderViewImpl> { | 156 public base::SupportsWeakPtr<RenderViewImpl> { |
| 157 public: | 157 public: |
| 158 // Creates a new RenderView. |opener_id| is the routing ID of the RenderView | 158 // Creates a new RenderView. |opener_id| is the routing ID of the RenderView |
| 159 // responsible for creating this RenderView. Note that if the original opener | 159 // responsible for creating this RenderView. Note that if the original opener |
| 160 // has been closed, |window_was_created_with_opener| will be true and | 160 // has been closed, |window_was_created_with_opener| will be true and |
| 161 // |opener_id| will be MSG_ROUTING_NONE. When |swapped_out| is true, the | 161 // |opener_id| will be MSG_ROUTING_NONE. When |swapped_out| is true, the |
| 162 // |proxy_routing_id| is specified, so a RenderFrameProxy can be created for | 162 // |proxy_routing_id| is specified, so a RenderFrameProxy can be created for |
| 163 // this RenderView's main RenderFrame. | 163 // this RenderView's main RenderFrame. |
| 164 static RenderViewImpl* Create(const ViewMsg_New_Params& params, | 164 static RenderViewImpl* Create(CompositorDependencies* compositor_deps, |
| 165 CompositorDependencies* compositor_deps, | 165 const ViewMsg_New_Params& params, |
| 166 bool was_created_by_renderer); | 166 bool was_created_by_renderer); |
| 167 | 167 |
| 168 // Used by content_layouttest_support to hook into the creation of | 168 // Used by content_layouttest_support to hook into the creation of |
| 169 // RenderViewImpls. | 169 // RenderViewImpls. |
| 170 static void InstallCreateHook( | 170 static void InstallCreateHook(RenderViewImpl* (*create_render_view_impl)( |
| 171 RenderViewImpl* (*create_render_view_impl)(const ViewMsg_New_Params&)); | 171 CompositorDependencies* compositor_deps, |
| 172 const ViewMsg_New_Params&)); |
| 172 | 173 |
| 173 // Returns the RenderViewImpl containing the given WebView. | 174 // Returns the RenderViewImpl containing the given WebView. |
| 174 static RenderViewImpl* FromWebView(blink::WebView* webview); | 175 static RenderViewImpl* FromWebView(blink::WebView* webview); |
| 175 | 176 |
| 176 // Returns the RenderViewImpl for the given routing ID. | 177 // Returns the RenderViewImpl for the given routing ID. |
| 177 static RenderViewImpl* FromRoutingID(int routing_id); | 178 static RenderViewImpl* FromRoutingID(int routing_id); |
| 178 | 179 |
| 179 // May return NULL when the view is closing. | 180 // May return NULL when the view is closing. |
| 180 blink::WebView* webview() const; | 181 blink::WebView* webview() const; |
| 181 | 182 |
| (...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 480 void GetSelectionBounds(gfx::Rect* start, gfx::Rect* end) override; | 481 void GetSelectionBounds(gfx::Rect* start, gfx::Rect* end) override; |
| 481 void FocusChangeComplete() override; | 482 void FocusChangeComplete() override; |
| 482 void GetCompositionCharacterBounds( | 483 void GetCompositionCharacterBounds( |
| 483 std::vector<gfx::Rect>* character_bounds) override; | 484 std::vector<gfx::Rect>* character_bounds) override; |
| 484 void GetCompositionRange(gfx::Range* range) override; | 485 void GetCompositionRange(gfx::Range* range) override; |
| 485 bool CanComposeInline() override; | 486 bool CanComposeInline() override; |
| 486 void DidCommitCompositorFrame() override; | 487 void DidCommitCompositorFrame() override; |
| 487 void DidCompletePageScaleAnimation() override; | 488 void DidCompletePageScaleAnimation() override; |
| 488 | 489 |
| 489 protected: | 490 protected: |
| 490 explicit RenderViewImpl(const ViewMsg_New_Params& params); | 491 RenderViewImpl(CompositorDependencies* compositor_deps, |
| 492 const ViewMsg_New_Params& params); |
| 491 | 493 |
| 492 void Initialize(const ViewMsg_New_Params& params, | 494 void Initialize(const ViewMsg_New_Params& params, |
| 493 CompositorDependencies* compositor_deps, | |
| 494 bool was_created_by_renderer); | 495 bool was_created_by_renderer); |
| 495 void SetScreenMetricsEmulationParameters( | 496 void SetScreenMetricsEmulationParameters( |
| 496 bool enabled, | 497 bool enabled, |
| 497 const blink::WebDeviceEmulationParams& params) override; | 498 const blink::WebDeviceEmulationParams& params) override; |
| 498 | 499 |
| 499 // Do not delete directly. This class is reference counted. | 500 // Do not delete directly. This class is reference counted. |
| 500 virtual ~RenderViewImpl(); | 501 virtual ~RenderViewImpl(); |
| 501 | 502 |
| 502 private: | 503 private: |
| 503 // For unit tests. | 504 // For unit tests. |
| (...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1017 // use the Observer interface to filter IPC messages and receive frame change | 1018 // use the Observer interface to filter IPC messages and receive frame change |
| 1018 // notifications. | 1019 // notifications. |
| 1019 // --------------------------------------------------------------------------- | 1020 // --------------------------------------------------------------------------- |
| 1020 | 1021 |
| 1021 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl); | 1022 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl); |
| 1022 }; | 1023 }; |
| 1023 | 1024 |
| 1024 } // namespace content | 1025 } // namespace content |
| 1025 | 1026 |
| 1026 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ | 1027 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ |
| OLD | NEW |