| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 #include "web/WebDevToolsAgentImpl.h" | 221 #include "web/WebDevToolsAgentImpl.h" |
| 222 #include "web/WebFrameWidgetImpl.h" | 222 #include "web/WebFrameWidgetImpl.h" |
| 223 #include "web/WebPluginContainerImpl.h" | 223 #include "web/WebPluginContainerImpl.h" |
| 224 #include "web/WebRemoteFrameImpl.h" | 224 #include "web/WebRemoteFrameImpl.h" |
| 225 #include "web/WebViewImpl.h" | 225 #include "web/WebViewImpl.h" |
| 226 #include "wtf/CurrentTime.h" | 226 #include "wtf/CurrentTime.h" |
| 227 #include "wtf/HashMap.h" | 227 #include "wtf/HashMap.h" |
| 228 #include "wtf/PtrUtil.h" | 228 #include "wtf/PtrUtil.h" |
| 229 #include <algorithm> | 229 #include <algorithm> |
| 230 #include <memory> | 230 #include <memory> |
| 231 #include <utility> |
| 231 | 232 |
| 232 namespace blink { | 233 namespace blink { |
| 233 | 234 |
| 234 static int frameCount = 0; | 235 static int frameCount = 0; |
| 235 | 236 |
| 236 static HeapVector<ScriptSourceCode> createSourcesVector( | 237 static HeapVector<ScriptSourceCode> createSourcesVector( |
| 237 const WebScriptSource* sourcesIn, | 238 const WebScriptSource* sourcesIn, |
| 238 unsigned numSources) { | 239 unsigned numSources) { |
| 239 HeapVector<ScriptSourceCode> sources; | 240 HeapVector<ScriptSourceCode> sources; |
| 240 sources.append(sourcesIn, numSources); | 241 sources.append(sourcesIn, numSources); |
| (...skipping 1791 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2032 // Screen Orientation API | 2033 // Screen Orientation API |
| 2033 if (ScreenOrientationController::from(*frame())) | 2034 if (ScreenOrientationController::from(*frame())) |
| 2034 ScreenOrientationController::from(*frame())->notifyOrientationChanged(); | 2035 ScreenOrientationController::from(*frame())->notifyOrientationChanged(); |
| 2035 | 2036 |
| 2036 // Legacy window.orientation API | 2037 // Legacy window.orientation API |
| 2037 if (RuntimeEnabledFeatures::orientationEventEnabled() && frame()->domWindow()) | 2038 if (RuntimeEnabledFeatures::orientationEventEnabled() && frame()->domWindow()) |
| 2038 frame()->localDOMWindow()->sendOrientationChangeEvent(); | 2039 frame()->localDOMWindow()->sendOrientationChangeEvent(); |
| 2039 } | 2040 } |
| 2040 | 2041 |
| 2041 void WebLocalFrameImpl::willShowInstallBannerPrompt( | 2042 void WebLocalFrameImpl::willShowInstallBannerPrompt( |
| 2042 int requestId, | 2043 mojo::ScopedMessagePipeHandle serviceHandle, |
| 2044 mojo::ScopedMessagePipeHandle eventHandle, |
| 2043 const WebVector<WebString>& platforms, | 2045 const WebVector<WebString>& platforms, |
| 2044 WebAppBannerPromptReply* reply) { | 2046 mojom::AppBannerPromptReply* reply) { |
| 2045 if (!frame()) | 2047 if (!frame()) |
| 2046 return; | 2048 return; |
| 2047 | 2049 |
| 2048 AppBannerController::willShowInstallBannerPrompt( | 2050 AppBannerController::willShowInstallBannerPrompt( |
| 2049 requestId, client()->appBannerClient(), frame(), platforms, reply); | 2051 frame(), std::move(serviceHandle), std::move(eventHandle), platforms, |
| 2052 reply); |
| 2050 } | 2053 } |
| 2051 | 2054 |
| 2052 void WebLocalFrameImpl::requestRunTask(WebSuspendableTask* task) const { | 2055 void WebLocalFrameImpl::requestRunTask(WebSuspendableTask* task) const { |
| 2053 DCHECK(frame()); | 2056 DCHECK(frame()); |
| 2054 DCHECK(frame()->document()); | 2057 DCHECK(frame()->document()); |
| 2055 frame()->document()->postSuspendableTask( | 2058 frame()->document()->postSuspendableTask( |
| 2056 WebSuspendableTaskWrapper::create(wrapUnique(task))); | 2059 WebSuspendableTaskWrapper::create(wrapUnique(task))); |
| 2057 } | 2060 } |
| 2058 | 2061 |
| 2059 void WebLocalFrameImpl::didCallAddSearchProvider() { | 2062 void WebLocalFrameImpl::didCallAddSearchProvider() { |
| (...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2328 feature = UseCounter::ChromeLoadTimesNpnNegotiatedProtocol; | 2331 feature = UseCounter::ChromeLoadTimesNpnNegotiatedProtocol; |
| 2329 } else if (metric == "wasAlternateProtocolAvailable") { | 2332 } else if (metric == "wasAlternateProtocolAvailable") { |
| 2330 feature = UseCounter::ChromeLoadTimesWasAlternateProtocolAvailable; | 2333 feature = UseCounter::ChromeLoadTimesWasAlternateProtocolAvailable; |
| 2331 } else if (metric == "connectionInfo") { | 2334 } else if (metric == "connectionInfo") { |
| 2332 feature = UseCounter::ChromeLoadTimesConnectionInfo; | 2335 feature = UseCounter::ChromeLoadTimesConnectionInfo; |
| 2333 } | 2336 } |
| 2334 UseCounter::count(frame(), feature); | 2337 UseCounter::count(frame(), feature); |
| 2335 } | 2338 } |
| 2336 | 2339 |
| 2337 } // namespace blink | 2340 } // namespace blink |
| OLD | NEW |