| 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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 // blink::WebPlugin implementation. | 82 // blink::WebPlugin implementation. |
| 83 blink::WebPluginContainer* container() const override; | 83 blink::WebPluginContainer* container() const override; |
| 84 bool initialize(blink::WebPluginContainer* container) override; | 84 bool initialize(blink::WebPluginContainer* container) override; |
| 85 void destroy() override; | 85 void destroy() override; |
| 86 v8::Local<v8::Object> v8ScriptableObject(v8::Isolate* isolate) override; | 86 v8::Local<v8::Object> v8ScriptableObject(v8::Isolate* isolate) override; |
| 87 bool supportsKeyboardFocus() const override; | 87 bool supportsKeyboardFocus() const override; |
| 88 bool supportsEditCommands() const override; | 88 bool supportsEditCommands() const override; |
| 89 bool supportsInputMethod() const override; | 89 bool supportsInputMethod() const override; |
| 90 bool canProcessDrag() const override; | 90 bool canProcessDrag() const override; |
| 91 void updateAllLifecyclePhases() override {} | 91 void updateAllLifecyclePhases() override {} |
| 92 void paint(blink::WebCanvas* canvas, const blink::WebRect& rect) override; | 92 void paint(blink::WebCanvas* canvas, const blink::WebRect& rect) override {} |
| 93 void updateGeometry(const blink::WebRect& window_rect, | 93 void updateGeometry(const blink::WebRect& window_rect, |
| 94 const blink::WebRect& clip_rect, | 94 const blink::WebRect& clip_rect, |
| 95 const blink::WebRect& unobscured_rect, | 95 const blink::WebRect& unobscured_rect, |
| 96 const blink::WebVector<blink::WebRect>& cut_outs_rects, | 96 const blink::WebVector<blink::WebRect>& cut_outs_rects, |
| 97 bool is_visible) override; | 97 bool is_visible) override; |
| 98 void updateFocus(bool focused, blink::WebFocusType focus_type) override; | 98 void updateFocus(bool focused, blink::WebFocusType focus_type) override; |
| 99 void updateVisibility(bool visible) override; | 99 void updateVisibility(bool visible) override; |
| 100 bool acceptsInputEvents() override; | 100 bool acceptsInputEvents() override; |
| 101 blink::WebInputEventResult handleInputEvent( | 101 blink::WebInputEventResult handleInputEvent( |
| 102 const blink::WebInputEvent& event, | 102 const blink::WebInputEvent& event, |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 // acquires a browser_plugin_instance_id as well. The guest instance ID | 139 // acquires a browser_plugin_instance_id as well. The guest instance ID |
| 140 // uniquely identifies a guest WebContents that's hosted by this | 140 // uniquely identifies a guest WebContents that's hosted by this |
| 141 // BrowserPlugin. | 141 // BrowserPlugin. |
| 142 BrowserPlugin(RenderFrame* render_frame, | 142 BrowserPlugin(RenderFrame* render_frame, |
| 143 const base::WeakPtr<BrowserPluginDelegate>& delegate); | 143 const base::WeakPtr<BrowserPluginDelegate>& delegate); |
| 144 | 144 |
| 145 ~BrowserPlugin() override; | 145 ~BrowserPlugin() override; |
| 146 | 146 |
| 147 gfx::Rect view_rect() const { return view_rect_; } | 147 gfx::Rect view_rect() const { return view_rect_; } |
| 148 | 148 |
| 149 void ShowSadGraphic(); | |
| 150 void UpdateInternalInstanceId(); | 149 void UpdateInternalInstanceId(); |
| 151 | 150 |
| 152 // IPC message handlers. | 151 // IPC message handlers. |
| 153 // Please keep in alphabetical order. | 152 // Please keep in alphabetical order. |
| 154 void OnAdvanceFocus(int instance_id, bool reverse); | 153 void OnAdvanceFocus(int instance_id, bool reverse); |
| 155 void OnGuestGone(int instance_id); | 154 void OnGuestGone(int instance_id); |
| 156 void OnSetChildFrameSurface(int instance_id, | 155 void OnSetChildFrameSurface(int instance_id, |
| 157 const cc::SurfaceId& surface_id, | 156 const cc::SurfaceId& surface_id, |
| 158 const gfx::Size& frame_size, | 157 const gfx::Size& frame_size, |
| 159 float scale_factor, | 158 float scale_factor, |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 // Weak factory used in v8 |MakeWeak| callback, since the v8 callback might | 207 // Weak factory used in v8 |MakeWeak| callback, since the v8 callback might |
| 209 // get called after BrowserPlugin has been destroyed. | 208 // get called after BrowserPlugin has been destroyed. |
| 210 base::WeakPtrFactory<BrowserPlugin> weak_ptr_factory_; | 209 base::WeakPtrFactory<BrowserPlugin> weak_ptr_factory_; |
| 211 | 210 |
| 212 DISALLOW_COPY_AND_ASSIGN(BrowserPlugin); | 211 DISALLOW_COPY_AND_ASSIGN(BrowserPlugin); |
| 213 }; | 212 }; |
| 214 | 213 |
| 215 } // namespace content | 214 } // namespace content |
| 216 | 215 |
| 217 #endif // CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_H_ | 216 #endif // CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_H_ |
| OLD | NEW |