OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 WebFrameWidgetBase_h | 5 #ifndef WebFrameWidgetBase_h |
6 #define WebFrameWidgetBase_h | 6 #define WebFrameWidgetBase_h |
7 | 7 |
8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
9 #include "core/clipboard/DataObject.h" | 9 #include "core/clipboard/DataObject.h" |
10 #include "core/dom/UserGestureIndicator.h" | 10 #include "core/dom/UserGestureIndicator.h" |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 bool DoingDragAndDrop() { return doing_drag_and_drop_; } | 79 bool DoingDragAndDrop() { return doing_drag_and_drop_; } |
80 static void SetIgnoreInputEvents(bool value) { ignore_input_events_ = value; } | 80 static void SetIgnoreInputEvents(bool value) { ignore_input_events_ = value; } |
81 static bool IgnoreInputEvents() { return ignore_input_events_; } | 81 static bool IgnoreInputEvents() { return ignore_input_events_; } |
82 | 82 |
83 // WebWidget methods. | 83 // WebWidget methods. |
84 void DidAcquirePointerLock() override; | 84 void DidAcquirePointerLock() override; |
85 void DidNotAcquirePointerLock() override; | 85 void DidNotAcquirePointerLock() override; |
86 void DidLosePointerLock() override; | 86 void DidLosePointerLock() override; |
87 void ShowContextMenu(WebMenuSourceType) override; | 87 void ShowContextMenu(WebMenuSourceType) override; |
88 | 88 |
| 89 // Image decode functionality. |
| 90 void RequestDecode(sk_sp<SkImage>, |
| 91 std::unique_ptr<WTF::Function<void(bool)>> callback); |
| 92 |
89 protected: | 93 protected: |
90 enum DragAction { kDragEnter, kDragOver }; | 94 enum DragAction { kDragEnter, kDragOver }; |
91 | 95 |
92 // Consolidate some common code between starting a drag over a target and | 96 // Consolidate some common code between starting a drag over a target and |
93 // updating a drag over a target. If we're starting a drag, |isEntering| | 97 // updating a drag over a target. If we're starting a drag, |isEntering| |
94 // should be true. | 98 // should be true. |
95 WebDragOperation DragTargetDragEnterOrOver(const WebPoint& point_in_viewport, | 99 WebDragOperation DragTargetDragEnterOrOver(const WebPoint& point_in_viewport, |
96 const WebPoint& screen_point, | 100 const WebPoint& screen_point, |
97 DragAction, | 101 DragAction, |
98 int modifiers); | 102 int modifiers); |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 RefPtr<UserGestureToken> pointer_lock_gesture_token_; | 134 RefPtr<UserGestureToken> pointer_lock_gesture_token_; |
131 | 135 |
132 friend class WebViewImpl; | 136 friend class WebViewImpl; |
133 }; | 137 }; |
134 | 138 |
135 DEFINE_TYPE_CASTS(WebFrameWidgetBase, WebFrameWidget, widget, true, true); | 139 DEFINE_TYPE_CASTS(WebFrameWidgetBase, WebFrameWidget, widget, true, true); |
136 | 140 |
137 } // namespace blink | 141 } // namespace blink |
138 | 142 |
139 #endif | 143 #endif |
OLD | NEW |