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

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

Issue 2769823002: Add decode() functionality to image elements. (Closed)
Patch Set: rebase Created 3 years, 6 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 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 958 matching lines...) Expand 10 before | Expand all | Expand 10 after
969 969
970 WebLocalFrameBase* ChromeClientImpl::GetWebLocalFrameBase(LocalFrame* frame) { 970 WebLocalFrameBase* ChromeClientImpl::GetWebLocalFrameBase(LocalFrame* frame) {
971 return WebLocalFrameImpl::FromFrame(frame); 971 return WebLocalFrameImpl::FromFrame(frame);
972 } 972 }
973 973
974 WebRemoteFrameBase* ChromeClientImpl::GetWebRemoteFrameBase( 974 WebRemoteFrameBase* ChromeClientImpl::GetWebRemoteFrameBase(
975 RemoteFrame& frame) { 975 RemoteFrame& frame) {
976 return WebRemoteFrameImpl::FromFrame(frame); 976 return WebRemoteFrameImpl::FromFrame(frame);
977 } 977 }
978 978
979 void ChromeClientImpl::RequestDecode(
980 LocalFrame* frame,
981 sk_sp<SkImage> image,
982 std::unique_ptr<WTF::Function<void(bool)>> callback) {
983 WebLocalFrameImpl* web_frame = WebLocalFrameImpl::FromFrame(frame);
984 web_frame->LocalRoot()->FrameWidget()->RequestDecode(std::move(image),
985 std::move(callback));
986 }
987
979 void ChromeClientImpl::SetEventListenerProperties( 988 void ChromeClientImpl::SetEventListenerProperties(
980 LocalFrame* frame, 989 LocalFrame* frame,
981 WebEventListenerClass event_class, 990 WebEventListenerClass event_class,
982 WebEventListenerProperties properties) { 991 WebEventListenerProperties properties) {
983 // |frame| might be null if called via TreeScopeAdopter:: 992 // |frame| might be null if called via TreeScopeAdopter::
984 // moveNodeToNewDocument() and the new document has no frame attached. 993 // moveNodeToNewDocument() and the new document has no frame attached.
985 // Since a document without a frame cannot attach one later, it is safe to 994 // Since a document without a frame cannot attach one later, it is safe to
986 // exit early. 995 // exit early.
987 if (!frame) 996 if (!frame)
988 return; 997 return;
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
1270 if (RuntimeEnabledFeatures::presentationEnabled()) 1279 if (RuntimeEnabledFeatures::presentationEnabled())
1271 PresentationController::ProvideTo(frame, client->PresentationClient()); 1280 PresentationController::ProvideTo(frame, client->PresentationClient());
1272 if (RuntimeEnabledFeatures::audioOutputDevicesEnabled()) { 1281 if (RuntimeEnabledFeatures::audioOutputDevicesEnabled()) {
1273 ProvideAudioOutputDeviceClientTo(frame, 1282 ProvideAudioOutputDeviceClientTo(frame,
1274 new AudioOutputDeviceClientImpl(frame)); 1283 new AudioOutputDeviceClientImpl(frame));
1275 } 1284 }
1276 InstalledAppController::ProvideTo(frame, client->GetRelatedAppsFetcher()); 1285 InstalledAppController::ProvideTo(frame, client->GetRelatedAppsFetcher());
1277 } 1286 }
1278 1287
1279 } // namespace blink 1288 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/ChromeClientImpl.h ('k') | third_party/WebKit/Source/web/WebViewImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698