Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_BROWSER_FRAME_HOST_RENDER_WIDGET_HOST_VIEW_GUEST_H_ | 5 #ifndef CONTENT_BROWSER_FRAME_HOST_RENDER_WIDGET_HOST_VIEW_GUEST_H_ |
| 6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_WIDGET_HOST_VIEW_GUEST_H_ | 6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_WIDGET_HOST_VIEW_GUEST_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 22 matching lines...) Expand all Loading... | |
| 33 // The BrowserPlugin is currently a special case for out-of-process rendered | 33 // The BrowserPlugin is currently a special case for out-of-process rendered |
| 34 // content and therefore inherits from RenderWidgetHostViewChildFrame. | 34 // content and therefore inherits from RenderWidgetHostViewChildFrame. |
| 35 // Eventually all RenderWidgetHostViewGuest code will be subsumed by | 35 // Eventually all RenderWidgetHostViewGuest code will be subsumed by |
| 36 // RenderWidgetHostViewChildFrame and this class will be removed. | 36 // RenderWidgetHostViewChildFrame and this class will be removed. |
| 37 // | 37 // |
| 38 // Some elements that are platform specific will be deal with by delegating | 38 // Some elements that are platform specific will be deal with by delegating |
| 39 // the relevant calls to the platform view. | 39 // the relevant calls to the platform view. |
| 40 class CONTENT_EXPORT RenderWidgetHostViewGuest | 40 class CONTENT_EXPORT RenderWidgetHostViewGuest |
| 41 : public RenderWidgetHostViewChildFrame, | 41 : public RenderWidgetHostViewChildFrame, |
| 42 public ui::GestureConsumer, | 42 public ui::GestureConsumer, |
| 43 public ui::GestureEventHelper { | 43 public ui::GestureEventHelper { |
|
tdresser
2015/11/02 15:38:25
We don't need to be a GestureEventHelper anymore,
wjmaclean
2015/11/02 19:23:10
I missed this, so thanks for noticing! We can dele
| |
| 44 public: | 44 public: |
| 45 RenderWidgetHostViewGuest( | 45 RenderWidgetHostViewGuest( |
| 46 RenderWidgetHost* widget, | 46 RenderWidgetHost* widget, |
| 47 BrowserPluginGuest* guest, | 47 BrowserPluginGuest* guest, |
| 48 base::WeakPtr<RenderWidgetHostViewBase> platform_view); | 48 base::WeakPtr<RenderWidgetHostViewBase> platform_view); |
| 49 ~RenderWidgetHostViewGuest() override; | 49 ~RenderWidgetHostViewGuest() override; |
| 50 | 50 |
| 51 bool OnMessageReceivedFromEmbedder(const IPC::Message& message, | 51 bool OnMessageReceivedFromEmbedder(const IPC::Message& message, |
| 52 RenderWidgetHostImpl* embedder); | 52 RenderWidgetHostImpl* embedder); |
| 53 | 53 |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 91 size_t offset, | 91 size_t offset, |
| 92 const gfx::Range& range) override; | 92 const gfx::Range& range) override; |
| 93 void SelectionBoundsChanged( | 93 void SelectionBoundsChanged( |
| 94 const ViewHostMsg_SelectionBounds_Params& params) override; | 94 const ViewHostMsg_SelectionBounds_Params& params) override; |
| 95 void OnSwapCompositorFrame(uint32 output_surface_id, | 95 void OnSwapCompositorFrame(uint32 output_surface_id, |
| 96 scoped_ptr<cc::CompositorFrame> frame) override; | 96 scoped_ptr<cc::CompositorFrame> frame) override; |
| 97 #if defined(USE_AURA) | 97 #if defined(USE_AURA) |
| 98 void ProcessAckedTouchEvent(const TouchEventWithLatencyInfo& touch, | 98 void ProcessAckedTouchEvent(const TouchEventWithLatencyInfo& touch, |
| 99 InputEventAckState ack_result) override; | 99 InputEventAckState ack_result) override; |
| 100 #endif | 100 #endif |
| 101 void ProcessTouchEvent(const blink::WebTouchEvent& event, | |
| 102 const ui::LatencyInfo& latency) override; | |
| 101 bool LockMouse() override; | 103 bool LockMouse() override; |
| 102 void UnlockMouse() override; | 104 void UnlockMouse() override; |
| 103 void GetScreenInfo(blink::WebScreenInfo* results) override; | 105 void GetScreenInfo(blink::WebScreenInfo* results) override; |
| 104 bool GetScreenColorProfile(std::vector<char>* color_profile) override; | 106 bool GetScreenColorProfile(std::vector<char>* color_profile) override; |
| 105 | 107 |
| 106 #if defined(OS_MACOSX) | 108 #if defined(OS_MACOSX) |
| 107 // RenderWidgetHostView implementation. | 109 // RenderWidgetHostView implementation. |
| 108 void SetActive(bool active) override; | 110 void SetActive(bool active) override; |
| 109 void SetWindowVisibility(bool visible) override; | 111 void SetWindowVisibility(bool visible) override; |
| 110 void WindowFrameChanged() override; | 112 void WindowFrameChanged() override; |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 166 const blink::WebInputEvent* event); | 168 const blink::WebInputEvent* event); |
| 167 | 169 |
| 168 // BrowserPluginGuest and RenderWidgetHostViewGuest's lifetimes are not tied | 170 // BrowserPluginGuest and RenderWidgetHostViewGuest's lifetimes are not tied |
| 169 // to one another, therefore we access |guest_| through WeakPtr. | 171 // to one another, therefore we access |guest_| through WeakPtr. |
| 170 base::WeakPtr<BrowserPluginGuest> guest_; | 172 base::WeakPtr<BrowserPluginGuest> guest_; |
| 171 gfx::Size size_; | 173 gfx::Size size_; |
| 172 // The platform view for this RenderWidgetHostView. | 174 // The platform view for this RenderWidgetHostView. |
| 173 // RenderWidgetHostViewGuest mostly only cares about stuff related to | 175 // RenderWidgetHostViewGuest mostly only cares about stuff related to |
| 174 // compositing, the rest are directly forwared to this |platform_view_|. | 176 // compositing, the rest are directly forwared to this |platform_view_|. |
| 175 base::WeakPtr<RenderWidgetHostViewBase> platform_view_; | 177 base::WeakPtr<RenderWidgetHostViewBase> platform_view_; |
| 176 #if defined(USE_AURA) | |
| 177 scoped_ptr<ui::GestureRecognizer> gesture_recognizer_; | |
| 178 #endif | |
| 179 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewGuest); | 178 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewGuest); |
| 180 }; | 179 }; |
| 181 | 180 |
| 182 } // namespace content | 181 } // namespace content |
| 183 | 182 |
| 184 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_WIDGET_HOST_VIEW_GUEST_H_ | 183 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_WIDGET_HOST_VIEW_GUEST_H_ |
| OLD | NEW |