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

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: Fixed build error on mac and win, nits 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
« no previous file with comments | « content/content_renderer.gypi ('k') | content/renderer/browser_plugin/browser_plugin.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 const BrowserPluginMsg_UpdateRect_Params& params); 239 const BrowserPluginMsg_UpdateRect_Params& params);
239 240
240 // Indicates whether the |pending_damage_buffer_| was used to copy over pixels 241 // Indicates whether the |pending_damage_buffer_| was used to copy over pixels
241 // given the provided |params|. 242 // given the provided |params|.
242 bool UsesPendingDamageBuffer( 243 bool UsesPendingDamageBuffer(
243 const BrowserPluginMsg_UpdateRect_Params& params); 244 const BrowserPluginMsg_UpdateRect_Params& params);
244 245
245 // IPC message handlers. 246 // IPC message handlers.
246 // Please keep in alphabetical order. 247 // Please keep in alphabetical order.
247 void OnAdvanceFocus(int instance_id, bool reverse); 248 void OnAdvanceFocus(int instance_id, bool reverse);
249 void OnBuffersSwapped(int instance_id,
250 const gfx::Size& size,
251 std::string mailbox_name,
252 int gpu_route_id,
253 int gpu_host_id);
248 void OnGuestContentWindowReady(int instance_id, 254 void OnGuestContentWindowReady(int instance_id,
249 int content_window_routing_id); 255 int content_window_routing_id);
250 void OnGuestGone(int instance_id, int process_id, int status); 256 void OnGuestGone(int instance_id, int process_id, int status);
251 void OnGuestResponsive(int instance_id, int process_id); 257 void OnGuestResponsive(int instance_id, int process_id);
252 void OnGuestUnresponsive(int instance_id, int process_id); 258 void OnGuestUnresponsive(int instance_id, int process_id);
253 void OnLoadAbort(int instance_id, 259 void OnLoadAbort(int instance_id,
254 const GURL& url, 260 const GURL& url,
255 bool is_top_level, 261 bool is_top_level,
256 const std::string& type); 262 const std::string& type);
257 void OnLoadCommit(int instance_id, 263 void OnLoadCommit(int instance_id,
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 // the embedder process. It should only be updated in response to navigation 330 // the embedder process. It should only be updated in response to navigation
325 // events in the guest. No assumptions should be made about how the index 331 // events in the guest. No assumptions should be made about how the index
326 // will change after a navigation (e.g., for back, forward, or go), because 332 // will change after a navigation (e.g., for back, forward, or go), because
327 // the changes are not always obvious. For example, there is a maximum 333 // the changes are not always obvious. For example, there is a maximum
328 // number of entries and earlier ones will automatically be pruned. 334 // number of entries and earlier ones will automatically be pruned.
329 int current_nav_entry_index_; 335 int current_nav_entry_index_;
330 int nav_entry_count_; 336 int nav_entry_count_;
331 337
332 // Used for HW compositing. 338 // Used for HW compositing.
333 bool compositing_enabled_; 339 bool compositing_enabled_;
340 scoped_ptr<BrowserPluginCompositingHelper> compositing_helper_;
334 341
335 DISALLOW_COPY_AND_ASSIGN(BrowserPlugin); 342 DISALLOW_COPY_AND_ASSIGN(BrowserPlugin);
336 }; 343 };
337 344
338 } // namespace content 345 } // namespace content
339 346
340 #endif // CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_H_ 347 #endif // CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_H_
OLDNEW
« no previous file with comments | « content/content_renderer.gypi ('k') | content/renderer/browser_plugin/browser_plugin.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698