Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(95)

Side by Side Diff: content/renderer/browser_plugin/browser_plugin.h

Issue 1169983006: Convert BrowserPlugin to render using cc::Surfaces. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Restore guest resize pathway. Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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_BROWSER_PLUGIN_BROWSER_PLUGIN_H_ 5 #ifndef CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_H_
6 #define CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_H_ 6 #define CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_H_
7 7
8 #include "third_party/WebKit/public/web/WebPlugin.h" 8 #include "third_party/WebKit/public/web/WebPlugin.h"
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "base/memory/weak_ptr.h" 11 #include "base/memory/weak_ptr.h"
12 #include "base/sequenced_task_runner_helpers.h" 12 #include "base/sequenced_task_runner_helpers.h"
13 #include "content/renderer/mouse_lock_dispatcher.h" 13 #include "content/renderer/mouse_lock_dispatcher.h"
14 #include "content/renderer/render_view_impl.h" 14 #include "content/renderer/render_view_impl.h"
15 #include "third_party/WebKit/public/web/WebCompositionUnderline.h" 15 #include "third_party/WebKit/public/web/WebCompositionUnderline.h"
16 #include "third_party/WebKit/public/web/WebDragStatus.h" 16 #include "third_party/WebKit/public/web/WebDragStatus.h"
17 #include "third_party/WebKit/public/web/WebNode.h" 17 #include "third_party/WebKit/public/web/WebNode.h"
18 #include "third_party/WebKit/public/web/WebWidget.h" 18 #include "third_party/WebKit/public/web/WebWidget.h"
19 19
20 struct BrowserPluginHostMsg_ResizeGuest_Params; 20 struct BrowserPluginHostMsg_ResizeGuest_Params;
21 struct FrameMsg_BuffersSwapped_Params; 21 struct FrameMsg_BuffersSwapped_Params;
22 22
23 namespace cc {
24 struct SurfaceId;
25 struct SurfaceSequence;
26 }
27
23 namespace content { 28 namespace content {
24 29
25 class BrowserPluginDelegate; 30 class BrowserPluginDelegate;
26 class BrowserPluginManager; 31 class BrowserPluginManager;
27 class ChildFrameCompositingHelper; 32 class ChildFrameCompositingHelper;
28 33
29 class CONTENT_EXPORT BrowserPlugin : 34 class CONTENT_EXPORT BrowserPlugin :
30 NON_EXPORTED_BASE(public blink::WebPlugin), 35 NON_EXPORTED_BASE(public blink::WebPlugin),
31 public MouseLockDispatcher::LockTarget { 36 public MouseLockDispatcher::LockTarget {
32 public: 37 public:
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 157
153 gfx::Rect view_rect() const { return view_rect_; } 158 gfx::Rect view_rect() const { return view_rect_; }
154 159
155 void ShowSadGraphic(); 160 void ShowSadGraphic();
156 161
157 // IPC message handlers. 162 // IPC message handlers.
158 // Please keep in alphabetical order. 163 // Please keep in alphabetical order.
159 void OnAdvanceFocus(int instance_id, bool reverse); 164 void OnAdvanceFocus(int instance_id, bool reverse);
160 void OnCompositorFrameSwapped(const IPC::Message& message); 165 void OnCompositorFrameSwapped(const IPC::Message& message);
161 void OnGuestGone(int instance_id); 166 void OnGuestGone(int instance_id);
167 void OnSetChildFrameSurface(int instance_id,
168 const cc::SurfaceId& surface_id,
169 const gfx::Size& frame_size,
170 float scale_factor,
171 const cc::SurfaceSequence& sequence);
162 void OnSetContentsOpaque(int instance_id, bool opaque); 172 void OnSetContentsOpaque(int instance_id, bool opaque);
163 void OnSetCursor(int instance_id, const WebCursor& cursor); 173 void OnSetCursor(int instance_id, const WebCursor& cursor);
164 void OnSetMouseLock(int instance_id, bool enable); 174 void OnSetMouseLock(int instance_id, bool enable);
165 void OnSetTooltipText(int browser_plugin_instance_id, 175 void OnSetTooltipText(int browser_plugin_instance_id,
166 const base::string16& tooltip_text); 176 const base::string16& tooltip_text);
167 void OnShouldAcceptTouchEvents(int instance_id, bool accept); 177 void OnShouldAcceptTouchEvents(int instance_id, bool accept);
168 178
169 // This indicates whether this BrowserPlugin has been attached to a 179 // This indicates whether this BrowserPlugin has been attached to a
170 // WebContents and is ready to receive IPCs. 180 // WebContents and is ready to receive IPCs.
171 bool attached_; 181 bool attached_;
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 // Weak factory used in v8 |MakeWeak| callback, since the v8 callback might 216 // Weak factory used in v8 |MakeWeak| callback, since the v8 callback might
207 // get called after BrowserPlugin has been destroyed. 217 // get called after BrowserPlugin has been destroyed.
208 base::WeakPtrFactory<BrowserPlugin> weak_ptr_factory_; 218 base::WeakPtrFactory<BrowserPlugin> weak_ptr_factory_;
209 219
210 DISALLOW_COPY_AND_ASSIGN(BrowserPlugin); 220 DISALLOW_COPY_AND_ASSIGN(BrowserPlugin);
211 }; 221 };
212 222
213 } // namespace content 223 } // namespace content
214 224
215 #endif // CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_H_ 225 #endif // CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698