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/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 29 matching lines...) Expand all Loading... |
40 | 40 |
41 // Update Browser Plugin's DOM Node attribute |attribute_name| with the value | 41 // Update Browser Plugin's DOM Node attribute |attribute_name| with the value |
42 // |attribute_value|. | 42 // |attribute_value|. |
43 void UpdateDOMAttribute(const std::string& attribute_name, | 43 void UpdateDOMAttribute(const std::string& attribute_name, |
44 const base::string16& attribute_value); | 44 const base::string16& attribute_value); |
45 | 45 |
46 // Returns whether the guest process has crashed. | 46 // Returns whether the guest process has crashed. |
47 bool guest_crashed() const { return guest_crashed_; } | 47 bool guest_crashed() const { return guest_crashed_; } |
48 | 48 |
49 // Informs the guest of an updated focus state. | 49 // Informs the guest of an updated focus state. |
50 void UpdateGuestFocusState(); | 50 void UpdateGuestFocusState(blink::WebFocusType focus_type); |
51 | 51 |
52 // Indicates whether the guest should be focused. | 52 // Indicates whether the guest should be focused. |
53 bool ShouldGuestBeFocused() const; | 53 bool ShouldGuestBeFocused() const; |
54 | 54 |
55 // Embedder's device scale factor changed, we need to update the guest | 55 // Embedder's device scale factor changed, we need to update the guest |
56 // renderer. | 56 // renderer. |
57 void UpdateDeviceScaleFactor(); | 57 void UpdateDeviceScaleFactor(); |
58 | 58 |
59 // A request to enable hardware compositing. | 59 // A request to enable hardware compositing. |
60 void EnableCompositing(bool enable); | 60 void EnableCompositing(bool enable); |
(...skipping 24 matching lines...) Expand all Loading... |
85 virtual bool supportsInputMethod() const override; | 85 virtual bool supportsInputMethod() const override; |
86 virtual bool canProcessDrag() const override; | 86 virtual bool canProcessDrag() const override; |
87 virtual void paint( | 87 virtual void paint( |
88 blink::WebCanvas* canvas, | 88 blink::WebCanvas* canvas, |
89 const blink::WebRect& rect) override; | 89 const blink::WebRect& rect) override; |
90 virtual void updateGeometry( | 90 virtual void updateGeometry( |
91 const blink::WebRect& frame_rect, | 91 const blink::WebRect& frame_rect, |
92 const blink::WebRect& clip_rect, | 92 const blink::WebRect& clip_rect, |
93 const blink::WebVector<blink::WebRect>& cut_outs_rects, | 93 const blink::WebVector<blink::WebRect>& cut_outs_rects, |
94 bool is_visible) override; | 94 bool is_visible) override; |
95 virtual void updateFocus(bool focused) override; | 95 virtual void updateFocus(bool focused, |
| 96 blink::WebFocusType focus_type) override; |
96 virtual void updateVisibility(bool visible) override; | 97 virtual void updateVisibility(bool visible) override; |
97 virtual bool acceptsInputEvents() override; | 98 virtual bool acceptsInputEvents() override; |
98 virtual bool handleInputEvent( | 99 virtual bool handleInputEvent( |
99 const blink::WebInputEvent& event, | 100 const blink::WebInputEvent& event, |
100 blink::WebCursorInfo& cursor_info) override; | 101 blink::WebCursorInfo& cursor_info) override; |
101 virtual bool handleDragStatusUpdate(blink::WebDragStatus drag_status, | 102 virtual bool handleDragStatusUpdate(blink::WebDragStatus drag_status, |
102 const blink::WebDragData& drag_data, | 103 const blink::WebDragData& drag_data, |
103 blink::WebDragOperationsMask mask, | 104 blink::WebDragOperationsMask mask, |
104 const blink::WebPoint& position, | 105 const blink::WebPoint& position, |
105 const blink::WebPoint& screen) override; | 106 const blink::WebPoint& screen) override; |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 // Weak factory used in v8 |MakeWeak| callback, since the v8 callback might | 217 // Weak factory used in v8 |MakeWeak| callback, since the v8 callback might |
217 // get called after BrowserPlugin has been destroyed. | 218 // get called after BrowserPlugin has been destroyed. |
218 base::WeakPtrFactory<BrowserPlugin> weak_ptr_factory_; | 219 base::WeakPtrFactory<BrowserPlugin> weak_ptr_factory_; |
219 | 220 |
220 DISALLOW_COPY_AND_ASSIGN(BrowserPlugin); | 221 DISALLOW_COPY_AND_ASSIGN(BrowserPlugin); |
221 }; | 222 }; |
222 | 223 |
223 } // namespace content | 224 } // namespace content |
224 | 225 |
225 #endif // CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_H_ | 226 #endif // CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_H_ |
OLD | NEW |