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

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

Issue 594623002: Browser Plugin: Minor cleanup (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 | « no previous file | 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 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"
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 blink::WebFrame* frame, 153 blink::WebFrame* frame,
154 scoped_ptr<BrowserPluginDelegate> delegate); 154 scoped_ptr<BrowserPluginDelegate> delegate);
155 155
156 virtual ~BrowserPlugin(); 156 virtual ~BrowserPlugin();
157 157
158 int width() const { return plugin_rect_.width(); } 158 int width() const { return plugin_rect_.width(); }
159 int height() const { return plugin_rect_.height(); } 159 int height() const { return plugin_rect_.height(); }
160 gfx::Size plugin_size() const { return plugin_rect_.size(); } 160 gfx::Size plugin_size() const { return plugin_rect_.size(); }
161 gfx::Rect plugin_rect() const { return plugin_rect_; } 161 gfx::Rect plugin_rect() const { return plugin_rect_; }
162 162
163 // Virtual to allow for mocking in tests. 163 float GetDeviceScaleFactor() const;
164 virtual float GetDeviceScaleFactor() const;
165 164
166 void ShowSadGraphic(); 165 void ShowSadGraphic();
167 166
168 // Populates BrowserPluginHostMsg_ResizeGuest_Params with resize state. 167 // Populates BrowserPluginHostMsg_ResizeGuest_Params with resize state.
169 void PopulateResizeGuestParameters( 168 void PopulateResizeGuestParameters(
170 const gfx::Size& view_size, 169 const gfx::Size& view_size,
171 BrowserPluginHostMsg_ResizeGuest_Params* params); 170 BrowserPluginHostMsg_ResizeGuest_Params* params);
172 171
173 // IPC message handlers. 172 // IPC message handlers.
174 // Please keep in alphabetical order. 173 // Please keep in alphabetical order.
(...skipping 25 matching lines...) Expand all
200 // Bitmap for crashed plugin. Lazily initialized, non-owning pointer. 199 // Bitmap for crashed plugin. Lazily initialized, non-owning pointer.
201 SkBitmap* sad_guest_; 200 SkBitmap* sad_guest_;
202 bool guest_crashed_; 201 bool guest_crashed_;
203 bool plugin_focused_; 202 bool plugin_focused_;
204 // Tracks the visibility of the browser plugin regardless of the whole 203 // Tracks the visibility of the browser plugin regardless of the whole
205 // embedder RenderView's visibility. 204 // embedder RenderView's visibility.
206 bool visible_; 205 bool visible_;
207 206
208 WebCursor cursor_; 207 WebCursor cursor_;
209 208
210 gfx::Size last_view_size_;
211 bool mouse_locked_; 209 bool mouse_locked_;
212 210
213 // BrowserPlugin outlives RenderViewImpl in Chrome Apps and so we need to 211 // BrowserPlugin outlives RenderViewImpl in Chrome Apps and so we need to
214 // store the BrowserPlugin's BrowserPluginManager in a member variable to 212 // store the BrowserPlugin's BrowserPluginManager in a member variable to
215 // avoid accessing the RenderViewImpl. 213 // avoid accessing the RenderViewImpl.
216 const scoped_refptr<BrowserPluginManager> browser_plugin_manager_; 214 const scoped_refptr<BrowserPluginManager> browser_plugin_manager_;
217 215
218 // Used for HW compositing. 216 // Used for HW compositing.
219 scoped_refptr<ChildFrameCompositingHelper> compositing_helper_; 217 scoped_refptr<ChildFrameCompositingHelper> compositing_helper_;
220 218
(...skipping 10 matching lines...) Expand all
231 // Weak factory used in v8 |MakeWeak| callback, since the v8 callback might 229 // Weak factory used in v8 |MakeWeak| callback, since the v8 callback might
232 // get called after BrowserPlugin has been destroyed. 230 // get called after BrowserPlugin has been destroyed.
233 base::WeakPtrFactory<BrowserPlugin> weak_ptr_factory_; 231 base::WeakPtrFactory<BrowserPlugin> weak_ptr_factory_;
234 232
235 DISALLOW_COPY_AND_ASSIGN(BrowserPlugin); 233 DISALLOW_COPY_AND_ASSIGN(BrowserPlugin);
236 }; 234 };
237 235
238 } // namespace content 236 } // namespace content
239 237
240 #endif // CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_H_ 238 #endif // CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_H_
OLDNEW
« no previous file with comments | « no previous file | content/renderer/browser_plugin/browser_plugin.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698