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

Side by Side Diff: third_party/WebKit/Source/web/WebFrameWidgetBase.cpp

Issue 2769823002: Add decode() functionality to image elements. (Closed)
Patch Set: rebase + update Created 3 years, 7 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
OLDNEW
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 #include "web/WebFrameWidgetBase.h" 5 #include "web/WebFrameWidgetBase.h"
6 6
7 #include "core/dom/DocumentUserGestureToken.h" 7 #include "core/dom/DocumentUserGestureToken.h"
8 #include "core/exported/WebViewBase.h" 8 #include "core/exported/WebViewBase.h"
9 #include "core/frame/FrameView.h" 9 #include "core/frame/FrameView.h"
10 #include "core/frame/VisualViewport.h" 10 #include "core/frame/VisualViewport.h"
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 241
242 void WebFrameWidgetBase::DidNotAcquirePointerLock() { 242 void WebFrameWidgetBase::DidNotAcquirePointerLock() {
243 GetPage()->GetPointerLockController().DidNotAcquirePointerLock(); 243 GetPage()->GetPointerLockController().DidNotAcquirePointerLock();
244 } 244 }
245 245
246 void WebFrameWidgetBase::DidLosePointerLock() { 246 void WebFrameWidgetBase::DidLosePointerLock() {
247 pointer_lock_gesture_token_.Clear(); 247 pointer_lock_gesture_token_.Clear();
248 GetPage()->GetPointerLockController().DidLosePointerLock(); 248 GetPage()->GetPointerLockController().DidLosePointerLock();
249 } 249 }
250 250
251 void WebFrameWidgetBase::RequestDecode(
252 sk_sp<SkImage> image,
253 std::unique_ptr<WTF::Function<void(bool)>> callback) {
254 View()->RequestDecode(std::move(image), std::move(callback));
255 }
256
251 void WebFrameWidgetBase::PointerLockMouseEvent(const WebInputEvent& event) { 257 void WebFrameWidgetBase::PointerLockMouseEvent(const WebInputEvent& event) {
252 std::unique_ptr<UserGestureIndicator> gesture_indicator; 258 std::unique_ptr<UserGestureIndicator> gesture_indicator;
253 AtomicString event_type; 259 AtomicString event_type;
254 switch (event.GetType()) { 260 switch (event.GetType()) {
255 case WebInputEvent::kMouseDown: 261 case WebInputEvent::kMouseDown:
256 event_type = EventTypeNames::mousedown; 262 event_type = EventTypeNames::mousedown;
257 if (!GetPage() || !GetPage()->GetPointerLockController().GetElement()) 263 if (!GetPage() || !GetPage()->GetPointerLockController().GetElement())
258 break; 264 break;
259 gesture_indicator = WTF::WrapUnique(new UserGestureIndicator( 265 gesture_indicator = WTF::WrapUnique(new UserGestureIndicator(
260 DocumentUserGestureToken::Create(&GetPage() 266 DocumentUserGestureToken::Create(&GetPage()
(...skipping 19 matching lines...) Expand all
280 286
281 if (GetPage()) { 287 if (GetPage()) {
282 WebMouseEvent transformed_event = TransformWebMouseEvent( 288 WebMouseEvent transformed_event = TransformWebMouseEvent(
283 ToWebLocalFrameBase(LocalRoot())->GetFrameView(), mouse_event); 289 ToWebLocalFrameBase(LocalRoot())->GetFrameView(), mouse_event);
284 GetPage()->GetPointerLockController().DispatchLockedMouseEvent( 290 GetPage()->GetPointerLockController().DispatchLockedMouseEvent(
285 transformed_event, event_type); 291 transformed_event, event_type);
286 } 292 }
287 } 293 }
288 294
289 } // namespace blink 295 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698