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

Side by Side Diff: content/browser/browser_plugin/browser_plugin_embedder.h

Issue 11360106: Browser Plugin: Implement AutoSize (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merged with ToT Created 8 years, 1 month 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 | Annotate | Revision Log
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 // A BrowserPluginEmbedder has a list of guests it manages. 5 // A BrowserPluginEmbedder has a list of guests it manages.
6 // In the beginning when a renderer sees one or more guests (BrowserPlugin 6 // In the beginning when a renderer sees one or more guests (BrowserPlugin
7 // instance(s)) and there is a request to navigate to them, the WebContents for 7 // instance(s)) and there is a request to navigate to them, the WebContents for
8 // that renderer creates a BrowserPluginEmbedder for itself. The 8 // that renderer creates a BrowserPluginEmbedder for itself. The
9 // BrowserPluginEmbedder, in turn, manages a set of BrowserPluginGuests -- one 9 // BrowserPluginEmbedder, in turn, manages a set of BrowserPluginGuests -- one
10 // BrowserPluginGuest for each guest in the embedding WebContents. Note that 10 // BrowserPluginGuest for each guest in the embedding WebContents. Note that
(...skipping 13 matching lines...) Expand all
24 24
25 #include "base/compiler_specific.h" 25 #include "base/compiler_specific.h"
26 #include "content/public/browser/notification_observer.h" 26 #include "content/public/browser/notification_observer.h"
27 #include "content/public/browser/notification_registrar.h" 27 #include "content/public/browser/notification_registrar.h"
28 #include "content/public/browser/web_contents_observer.h" 28 #include "content/public/browser/web_contents_observer.h"
29 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDragStatus.h" 29 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDragStatus.h"
30 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDragOperation.h" 30 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDragOperation.h"
31 #include "ui/surface/transport_dib.h" 31 #include "ui/surface/transport_dib.h"
32 #include "webkit/glue/webdropdata.h" 32 #include "webkit/glue/webdropdata.h"
33 33
34 struct BrowserPluginHostMsg_AutoSize_Params;
34 struct BrowserPluginHostMsg_CreateGuest_Params; 35 struct BrowserPluginHostMsg_CreateGuest_Params;
35 struct BrowserPluginHostMsg_ResizeGuest_Params; 36 struct BrowserPluginHostMsg_ResizeGuest_Params;
36 37
37 namespace WebKit { 38 namespace WebKit {
38 class WebInputEvent; 39 class WebInputEvent;
39 } 40 }
40 41
41 namespace gfx { 42 namespace gfx {
42 class Point; 43 class Point;
43 class Rect; 44 class Rect;
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 const WebKit::WebInputEvent& event, 110 const WebKit::WebInputEvent& event,
110 IPC::Message* reply_message); 111 IPC::Message* reply_message);
111 void PluginDestroyed(int instance_id); 112 void PluginDestroyed(int instance_id);
112 void SetGuestVisibility(int instance_id, 113 void SetGuestVisibility(int instance_id,
113 bool guest_visible); 114 bool guest_visible);
114 void DragStatusUpdate(int instance_id, 115 void DragStatusUpdate(int instance_id,
115 WebKit::WebDragStatus drag_status, 116 WebKit::WebDragStatus drag_status,
116 const WebDropData& drop_data, 117 const WebDropData& drop_data,
117 WebKit::WebDragOperationsMask drag_mask, 118 WebKit::WebDragOperationsMask drag_mask,
118 const gfx::Point& location); 119 const gfx::Point& location);
120 void SetAutoSize(
121 int instance_id,
122 const BrowserPluginHostMsg_AutoSize_Params& auto_size_params,
123 const BrowserPluginHostMsg_ResizeGuest_Params& resize_guest_params);
119 124
120 bool visible() const { return visible_; } 125 bool visible() const { return visible_; }
121 126
122 // Overrides factory for testing. Default (NULL) value indicates regular 127 // Overrides factory for testing. Default (NULL) value indicates regular
123 // (non-test) environment. 128 // (non-test) environment.
124 static void set_factory_for_testing(BrowserPluginHostFactory* factory) { 129 static void set_factory_for_testing(BrowserPluginHostFactory* factory) {
125 factory_ = factory; 130 factory_ = factory;
126 } 131 }
127 132
128 private: 133 private:
(...skipping 25 matching lines...) Expand all
154 RenderViewHost* render_view_host_; 159 RenderViewHost* render_view_host_;
155 // Tracks the visibility state of the embedder. 160 // Tracks the visibility state of the embedder.
156 bool visible_; 161 bool visible_;
157 162
158 DISALLOW_COPY_AND_ASSIGN(BrowserPluginEmbedder); 163 DISALLOW_COPY_AND_ASSIGN(BrowserPluginEmbedder);
159 }; 164 };
160 165
161 } // namespace content 166 } // namespace content
162 167
163 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_EMBEDDER_H_ 168 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_EMBEDDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698