| OLD | NEW |
| 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 928 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 939 WebConsoleMessage(WebConsoleMessage::kLevelError, message)); | 939 WebConsoleMessage(WebConsoleMessage::kLevelError, message)); |
| 940 | 940 |
| 941 return false; | 941 return false; |
| 942 } | 942 } |
| 943 | 943 |
| 944 WebLayerTreeView* ChromeClientImpl::GetWebLayerTreeView(LocalFrame* frame) { | 944 WebLayerTreeView* ChromeClientImpl::GetWebLayerTreeView(LocalFrame* frame) { |
| 945 WebLocalFrameImpl* web_frame = WebLocalFrameImpl::FromFrame(frame); | 945 WebLocalFrameImpl* web_frame = WebLocalFrameImpl::FromFrame(frame); |
| 946 return web_frame->LocalRoot()->FrameWidget()->GetLayerTreeView(); | 946 return web_frame->LocalRoot()->FrameWidget()->GetLayerTreeView(); |
| 947 } | 947 } |
| 948 | 948 |
| 949 void ChromeClientImpl::RequestDecode( |
| 950 LocalFrame* frame, |
| 951 sk_sp<SkImage> image, |
| 952 std::unique_ptr<WTF::Function<void(bool)>> callback) { |
| 953 WebLocalFrameImpl* web_frame = WebLocalFrameImpl::FromFrame(frame); |
| 954 web_frame->LocalRoot()->FrameWidget()->RequestDecode(std::move(image), |
| 955 std::move(callback)); |
| 956 } |
| 957 |
| 949 void ChromeClientImpl::SetEventListenerProperties( | 958 void ChromeClientImpl::SetEventListenerProperties( |
| 950 LocalFrame* frame, | 959 LocalFrame* frame, |
| 951 WebEventListenerClass event_class, | 960 WebEventListenerClass event_class, |
| 952 WebEventListenerProperties properties) { | 961 WebEventListenerProperties properties) { |
| 953 // |frame| might be null if called via TreeScopeAdopter:: | 962 // |frame| might be null if called via TreeScopeAdopter:: |
| 954 // moveNodeToNewDocument() and the new document has no frame attached. | 963 // moveNodeToNewDocument() and the new document has no frame attached. |
| 955 // Since a document without a frame cannot attach one later, it is safe to | 964 // Since a document without a frame cannot attach one later, it is safe to |
| 956 // exit early. | 965 // exit early. |
| 957 if (!frame) | 966 if (!frame) |
| 958 return; | 967 return; |
| (...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1233 if (RuntimeEnabledFeatures::presentationEnabled()) | 1242 if (RuntimeEnabledFeatures::presentationEnabled()) |
| 1234 PresentationController::ProvideTo(frame, client->PresentationClient()); | 1243 PresentationController::ProvideTo(frame, client->PresentationClient()); |
| 1235 if (RuntimeEnabledFeatures::audioOutputDevicesEnabled()) { | 1244 if (RuntimeEnabledFeatures::audioOutputDevicesEnabled()) { |
| 1236 ProvideAudioOutputDeviceClientTo(frame, | 1245 ProvideAudioOutputDeviceClientTo(frame, |
| 1237 new AudioOutputDeviceClientImpl(frame)); | 1246 new AudioOutputDeviceClientImpl(frame)); |
| 1238 } | 1247 } |
| 1239 InstalledAppController::ProvideTo(frame, client->GetRelatedAppsFetcher()); | 1248 InstalledAppController::ProvideTo(frame, client->GetRelatedAppsFetcher()); |
| 1240 } | 1249 } |
| 1241 | 1250 |
| 1242 } // namespace blink | 1251 } // namespace blink |
| OLD | NEW |