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

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

Issue 11824040: Enables compositing support for webview. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 11 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 (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_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/Source/WebKit/chromium/public/WebPlugin.h" 8 #include "third_party/WebKit/Source/WebKit/chromium/public/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/process_util.h" 12 #include "base/process_util.h"
13 #include "base/sequenced_task_runner_helpers.h" 13 #include "base/sequenced_task_runner_helpers.h"
14 #if defined(OS_WIN) 14 #if defined(OS_WIN)
15 #include "base/shared_memory.h" 15 #include "base/shared_memory.h"
16 #endif 16 #endif
17 #include "content/renderer/browser_plugin/browser_plugin_backing_store.h" 17 #include "content/renderer/browser_plugin/browser_plugin_backing_store.h"
18 #include "content/renderer/browser_plugin/browser_plugin_bindings.h" 18 #include "content/renderer/browser_plugin/browser_plugin_bindings.h"
19 #include "content/renderer/render_view_impl.h" 19 #include "content/renderer/render_view_impl.h"
20 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDragStatus.h" 20 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDragStatus.h"
21 21
22 struct BrowserPluginHostMsg_AutoSize_Params; 22 struct BrowserPluginHostMsg_AutoSize_Params;
23 struct BrowserPluginHostMsg_ResizeGuest_Params; 23 struct BrowserPluginHostMsg_ResizeGuest_Params;
24 struct BrowserPluginMsg_LoadCommit_Params; 24 struct BrowserPluginMsg_LoadCommit_Params;
25 struct BrowserPluginMsg_UpdateRect_Params; 25 struct BrowserPluginMsg_UpdateRect_Params;
26 26
27 namespace content { 27 namespace content {
28 28
29 class BrowserPluginCompositingHelper;
29 class BrowserPluginManager; 30 class BrowserPluginManager;
30 class MockBrowserPlugin; 31 class MockBrowserPlugin;
31 32
32 class CONTENT_EXPORT BrowserPlugin : 33 class CONTENT_EXPORT BrowserPlugin :
33 NON_EXPORTED_BASE(public WebKit::WebPlugin) { 34 NON_EXPORTED_BASE(public WebKit::WebPlugin) {
34 public: 35 public:
35 RenderViewImpl* render_view() const { return render_view_.get(); } 36 RenderViewImpl* render_view() const { return render_view_.get(); }
36 37
37 bool OnMessageReceived(const IPC::Message& msg); 38 bool OnMessageReceived(const IPC::Message& msg);
38 39
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 void OnLoadRedirect(int instance_id, 256 void OnLoadRedirect(int instance_id,
256 const GURL& old_url, 257 const GURL& old_url,
257 const GURL& new_url, 258 const GURL& new_url,
258 bool is_top_level); 259 bool is_top_level);
259 void OnLoadStart(int instance_id, const GURL& url, bool is_top_level); 260 void OnLoadStart(int instance_id, const GURL& url, bool is_top_level);
260 void OnLoadStop(int instance_id); 261 void OnLoadStop(int instance_id);
261 void OnSetCursor(int instance_id, const WebCursor& cursor); 262 void OnSetCursor(int instance_id, const WebCursor& cursor);
262 void OnShouldAcceptTouchEvents(int instance_id, bool accept); 263 void OnShouldAcceptTouchEvents(int instance_id, bool accept);
263 void OnUpdateRect(int instance_id, 264 void OnUpdateRect(int instance_id,
264 const BrowserPluginMsg_UpdateRect_Params& params); 265 const BrowserPluginMsg_UpdateRect_Params& params);
266 void OnBuffersSwapped(int instance_id,
Fady Samuel 2013/01/09 21:23:38 Alphabetical order.
267 const gfx::Size& size,
268 std::string mailbox_name,
269 int gpu_route_id,
270 int gpu_host_id);
265 271
266 int instance_id_; 272 int instance_id_;
267 base::WeakPtr<RenderViewImpl> render_view_; 273 base::WeakPtr<RenderViewImpl> render_view_;
268 // We cache the |render_view_|'s routing ID because we need it on destruction. 274 // We cache the |render_view_|'s routing ID because we need it on destruction.
269 // If the |render_view_| is destroyed before the BrowserPlugin is destroyed 275 // If the |render_view_| is destroyed before the BrowserPlugin is destroyed
270 // then we will attempt to access a NULL pointer. 276 // then we will attempt to access a NULL pointer.
271 int render_view_routing_id_; 277 int render_view_routing_id_;
272 WebKit::WebPluginContainer* container_; 278 WebKit::WebPluginContainer* container_;
273 scoped_ptr<BrowserPluginBindings> bindings_; 279 scoped_ptr<BrowserPluginBindings> bindings_;
274 scoped_ptr<BrowserPluginBackingStore> backing_store_; 280 scoped_ptr<BrowserPluginBackingStore> backing_store_;
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 // the embedder process. It should only be updated in response to navigation 324 // the embedder process. It should only be updated in response to navigation
319 // events in the guest. No assumptions should be made about how the index 325 // events in the guest. No assumptions should be made about how the index
320 // will change after a navigation (e.g., for back, forward, or go), because 326 // will change after a navigation (e.g., for back, forward, or go), because
321 // the changes are not always obvious. For example, there is a maximum 327 // the changes are not always obvious. For example, there is a maximum
322 // number of entries and earlier ones will automatically be pruned. 328 // number of entries and earlier ones will automatically be pruned.
323 int current_nav_entry_index_; 329 int current_nav_entry_index_;
324 int nav_entry_count_; 330 int nav_entry_count_;
325 331
326 // Used for HW compositing. 332 // Used for HW compositing.
327 bool compositing_enabled_; 333 bool compositing_enabled_;
334 scoped_ptr<BrowserPluginCompositingHelper> compositing_helper_;
328 335
329 DISALLOW_COPY_AND_ASSIGN(BrowserPlugin); 336 DISALLOW_COPY_AND_ASSIGN(BrowserPlugin);
330 }; 337 };
331 338
332 } // namespace content 339 } // namespace content
333 340
334 #endif // CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_H_ 341 #endif // CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698