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

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

Issue 2393513004: Convert app banners to use Mojo. (Closed)
Patch Set: Rebase Created 4 years, 2 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 * 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
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 1802 matching lines...) Expand 10 before | Expand all | Expand 10 after
2043 // Screen Orientation API 2044 // Screen Orientation API
2044 if (ScreenOrientationController::from(*frame())) 2045 if (ScreenOrientationController::from(*frame()))
2045 ScreenOrientationController::from(*frame())->notifyOrientationChanged(); 2046 ScreenOrientationController::from(*frame())->notifyOrientationChanged();
2046 2047
2047 // Legacy window.orientation API 2048 // Legacy window.orientation API
2048 if (RuntimeEnabledFeatures::orientationEventEnabled() && frame()->domWindow()) 2049 if (RuntimeEnabledFeatures::orientationEventEnabled() && frame()->domWindow())
2049 frame()->localDOMWindow()->sendOrientationChangeEvent(); 2050 frame()->localDOMWindow()->sendOrientationChangeEvent();
2050 } 2051 }
2051 2052
2052 void WebLocalFrameImpl::willShowInstallBannerPrompt( 2053 void WebLocalFrameImpl::willShowInstallBannerPrompt(
2053 int requestId, 2054 mojo::ScopedMessagePipeHandle serviceHandle,
2055 mojo::ScopedMessagePipeHandle eventHandle,
2054 const WebVector<WebString>& platforms, 2056 const WebVector<WebString>& platforms,
2055 WebAppBannerPromptReply* reply) { 2057 mojom::AppBannerPromptReply* reply) {
2056 if (!frame()) 2058 if (!frame())
2057 return; 2059 return;
2058 2060
2059 AppBannerController::willShowInstallBannerPrompt( 2061 AppBannerController::willShowInstallBannerPrompt(
2060 requestId, client()->appBannerClient(), frame(), platforms, reply); 2062 frame(), std::move(serviceHandle), std::move(eventHandle), platforms,
2063 reply);
2061 } 2064 }
2062 2065
2063 void WebLocalFrameImpl::requestRunTask(WebSuspendableTask* task) const { 2066 void WebLocalFrameImpl::requestRunTask(WebSuspendableTask* task) const {
2064 DCHECK(frame()); 2067 DCHECK(frame());
2065 DCHECK(frame()->document()); 2068 DCHECK(frame()->document());
2066 frame()->document()->postSuspendableTask( 2069 frame()->document()->postSuspendableTask(
2067 WebSuspendableTaskWrapper::create(wrapUnique(task))); 2070 WebSuspendableTaskWrapper::create(wrapUnique(task)));
2068 } 2071 }
2069 2072
2070 void WebLocalFrameImpl::didCallAddSearchProvider() { 2073 void WebLocalFrameImpl::didCallAddSearchProvider() {
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
2339 feature = UseCounter::ChromeLoadTimesNpnNegotiatedProtocol; 2342 feature = UseCounter::ChromeLoadTimesNpnNegotiatedProtocol;
2340 } else if (metric == "wasAlternateProtocolAvailable") { 2343 } else if (metric == "wasAlternateProtocolAvailable") {
2341 feature = UseCounter::ChromeLoadTimesWasAlternateProtocolAvailable; 2344 feature = UseCounter::ChromeLoadTimesWasAlternateProtocolAvailable;
2342 } else if (metric == "connectionInfo") { 2345 } else if (metric == "connectionInfo") {
2343 feature = UseCounter::ChromeLoadTimesConnectionInfo; 2346 feature = UseCounter::ChromeLoadTimesConnectionInfo;
2344 } 2347 }
2345 UseCounter::count(frame(), feature); 2348 UseCounter::count(frame(), feature);
2346 } 2349 }
2347 2350
2348 } // namespace blink 2351 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698