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

Unified Diff: content/browser/browser_plugin/browser_plugin_guest.h

Issue 1169983006: Convert BrowserPlugin to render using cc::Surfaces. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update test to always call UpdateGuestSizeIfNecessary(). 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/browser/browser_plugin/browser_plugin_guest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/browser_plugin/browser_plugin_guest.h
diff --git a/content/browser/browser_plugin/browser_plugin_guest.h b/content/browser/browser_plugin/browser_plugin_guest.h
index 86278b98694810af4cffc6ec4fa01b6f71f4346d..438fc1694e1f03694d4955aef3c73eab21e33f81 100644
--- a/content/browser/browser_plugin/browser_plugin_guest.h
+++ b/content/browser/browser_plugin/browser_plugin_guest.h
@@ -51,6 +51,8 @@ struct FrameHostMsg_ShowPopup_Params;
namespace cc {
class CompositorFrame;
+struct SurfaceId;
+struct SurfaceSequence;
} // namespace cc
namespace gfx {
@@ -213,10 +215,17 @@ class CONTENT_EXPORT BrowserPluginGuest : public GuestHost,
void PointerLockPermissionResponse(bool allow);
- void SwapCompositorFrame(uint32 output_surface_id,
- int host_process_id,
- int host_routing_id,
- scoped_ptr<cc::CompositorFrame> frame);
+ // The next three functions are virtual for test purposes.
+ virtual void UpdateGuestSizeIfNecessary(const gfx::Size& frame_size,
+ float scale_factor);
+ virtual void SwapCompositorFrame(uint32 output_surface_id,
+ int host_process_id,
+ int host_routing_id,
+ scoped_ptr<cc::CompositorFrame> frame);
+ virtual void SetChildFrameSurface(const cc::SurfaceId& surface_id,
+ const gfx::Size& frame_size,
+ float scale_factor,
+ const cc::SurfaceSequence& sequence);
void SetContentsOpaque(bool opaque);
@@ -227,20 +236,27 @@ class CONTENT_EXPORT BrowserPluginGuest : public GuestHost,
const blink::WebFindOptions& options);
bool StopFinding(StopFindAction action);
- private:
- class EmbedderVisibilityObserver;
+ protected:
// BrowserPluginGuest is a WebContentsObserver of |web_contents| and
// |web_contents| has to stay valid for the lifetime of BrowserPluginGuest.
+ // Constructor protected for testing.
BrowserPluginGuest(bool has_render_view,
WebContentsImpl* web_contents,
BrowserPluginGuestDelegate* delegate);
+ private:
+ class EmbedderVisibilityObserver;
+
void InitInternal(const BrowserPluginHostMsg_Attach_Params& params,
WebContentsImpl* owner_web_contents);
bool InAutoSizeBounds(const gfx::Size& size) const;
+ void OnSatisfySequence(int instance_id, const cc::SurfaceSequence& sequence);
+ void OnRequireSequence(int instance_id,
+ const cc::SurfaceId& id,
+ const cc::SurfaceSequence& sequence);
// Message handlers for messages from embedder.
void OnCompositorFrameSwappedACK(
int instance_id,
« no previous file with comments | « no previous file | content/browser/browser_plugin/browser_plugin_guest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698