| OLD | NEW |
| 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/macros.h" | 10 #include "base/macros.h" |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 void OnShouldAcceptTouchEvents(int instance_id, bool accept); | 167 void OnShouldAcceptTouchEvents(int instance_id, bool accept); |
| 168 | 168 |
| 169 // This indicates whether this BrowserPlugin has been attached to a | 169 // This indicates whether this BrowserPlugin has been attached to a |
| 170 // WebContents and is ready to receive IPCs. | 170 // WebContents and is ready to receive IPCs. |
| 171 bool attached_; | 171 bool attached_; |
| 172 // We cache the |render_frame_routing_id| because we need it on destruction. | 172 // We cache the |render_frame_routing_id| because we need it on destruction. |
| 173 // If the RenderFrame is destroyed before the BrowserPlugin is destroyed | 173 // If the RenderFrame is destroyed before the BrowserPlugin is destroyed |
| 174 // then we will attempt to access a nullptr. | 174 // then we will attempt to access a nullptr. |
| 175 const int render_frame_routing_id_; | 175 const int render_frame_routing_id_; |
| 176 blink::WebPluginContainer* container_; | 176 blink::WebPluginContainer* container_; |
| 177 // The plugin's rect in css pixels. |
| 177 gfx::Rect view_rect_; | 178 gfx::Rect view_rect_; |
| 178 // Bitmap for crashed plugin. Lazily initialized, non-owning pointer. | 179 // Bitmap for crashed plugin. Lazily initialized, non-owning pointer. |
| 179 SkBitmap* sad_guest_; | 180 SkBitmap* sad_guest_; |
| 180 bool guest_crashed_; | 181 bool guest_crashed_; |
| 181 bool plugin_focused_; | 182 bool plugin_focused_; |
| 182 // Tracks the visibility of the browser plugin regardless of the whole | 183 // Tracks the visibility of the browser plugin regardless of the whole |
| 183 // embedder RenderView's visibility. | 184 // embedder RenderView's visibility. |
| 184 bool visible_; | 185 bool visible_; |
| 185 | 186 |
| 186 WebCursor cursor_; | 187 WebCursor cursor_; |
| (...skipping 21 matching lines...) Expand all Loading... |
| 208 // Weak factory used in v8 |MakeWeak| callback, since the v8 callback might | 209 // Weak factory used in v8 |MakeWeak| callback, since the v8 callback might |
| 209 // get called after BrowserPlugin has been destroyed. | 210 // get called after BrowserPlugin has been destroyed. |
| 210 base::WeakPtrFactory<BrowserPlugin> weak_ptr_factory_; | 211 base::WeakPtrFactory<BrowserPlugin> weak_ptr_factory_; |
| 211 | 212 |
| 212 DISALLOW_COPY_AND_ASSIGN(BrowserPlugin); | 213 DISALLOW_COPY_AND_ASSIGN(BrowserPlugin); |
| 213 }; | 214 }; |
| 214 | 215 |
| 215 } // namespace content | 216 } // namespace content |
| 216 | 217 |
| 217 #endif // CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_H_ | 218 #endif // CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_H_ |
| OLD | NEW |