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

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

Issue 2379923002: Implement "appinstalled" event on Android. (Closed)
Patch Set: Minor refactor. 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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 #include "bindings/core/v8/DOMWrapperWorld.h" 91 #include "bindings/core/v8/DOMWrapperWorld.h"
92 #include "bindings/core/v8/ExceptionState.h" 92 #include "bindings/core/v8/ExceptionState.h"
93 #include "bindings/core/v8/ExceptionStatePlaceholder.h" 93 #include "bindings/core/v8/ExceptionStatePlaceholder.h"
94 #include "bindings/core/v8/ScriptController.h" 94 #include "bindings/core/v8/ScriptController.h"
95 #include "bindings/core/v8/ScriptSourceCode.h" 95 #include "bindings/core/v8/ScriptSourceCode.h"
96 #include "bindings/core/v8/ScriptValue.h" 96 #include "bindings/core/v8/ScriptValue.h"
97 #include "bindings/core/v8/SourceLocation.h" 97 #include "bindings/core/v8/SourceLocation.h"
98 #include "bindings/core/v8/V8Binding.h" 98 #include "bindings/core/v8/V8Binding.h"
99 #include "bindings/core/v8/V8GCController.h" 99 #include "bindings/core/v8/V8GCController.h"
100 #include "bindings/core/v8/V8PerIsolateData.h" 100 #include "bindings/core/v8/V8PerIsolateData.h"
101 #include "core/EventTypeNames.h"
101 #include "core/HTMLNames.h" 102 #include "core/HTMLNames.h"
102 #include "core/dom/Document.h" 103 #include "core/dom/Document.h"
103 #include "core/dom/IconURL.h" 104 #include "core/dom/IconURL.h"
104 #include "core/dom/MessagePort.h" 105 #include "core/dom/MessagePort.h"
105 #include "core/dom/Node.h" 106 #include "core/dom/Node.h"
106 #include "core/dom/NodeTraversal.h" 107 #include "core/dom/NodeTraversal.h"
107 #include "core/dom/SuspendableTask.h" 108 #include "core/dom/SuspendableTask.h"
108 #include "core/dom/shadow/ShadowRoot.h" 109 #include "core/dom/shadow/ShadowRoot.h"
109 #include "core/editing/EditingUtilities.h" 110 #include "core/editing/EditingUtilities.h"
110 #include "core/editing/Editor.h" 111 #include "core/editing/Editor.h"
111 #include "core/editing/FrameSelection.h" 112 #include "core/editing/FrameSelection.h"
112 #include "core/editing/InputMethodController.h" 113 #include "core/editing/InputMethodController.h"
113 #include "core/editing/PlainTextRange.h" 114 #include "core/editing/PlainTextRange.h"
114 #include "core/editing/TextAffinity.h" 115 #include "core/editing/TextAffinity.h"
115 #include "core/editing/iterators/TextIterator.h" 116 #include "core/editing/iterators/TextIterator.h"
116 #include "core/editing/serializers/Serialization.h" 117 #include "core/editing/serializers/Serialization.h"
117 #include "core/editing/spellcheck/SpellChecker.h" 118 #include "core/editing/spellcheck/SpellChecker.h"
119 #include "core/events/Event.h"
118 #include "core/fetch/ResourceFetcher.h" 120 #include "core/fetch/ResourceFetcher.h"
119 #include "core/fetch/SubstituteData.h" 121 #include "core/fetch/SubstituteData.h"
120 #include "core/frame/FrameHost.h" 122 #include "core/frame/FrameHost.h"
121 #include "core/frame/FrameView.h" 123 #include "core/frame/FrameView.h"
122 #include "core/frame/LocalDOMWindow.h" 124 #include "core/frame/LocalDOMWindow.h"
123 #include "core/frame/RemoteFrame.h" 125 #include "core/frame/RemoteFrame.h"
124 #include "core/frame/Settings.h" 126 #include "core/frame/Settings.h"
125 #include "core/frame/UseCounter.h" 127 #include "core/frame/UseCounter.h"
126 #include "core/frame/VisualViewport.h" 128 #include "core/frame/VisualViewport.h"
127 #include "core/html/HTMLAnchorElement.h" 129 #include "core/html/HTMLAnchorElement.h"
(...skipping 1926 matching lines...) Expand 10 before | Expand all | Expand 10 after
2054 int requestId, 2056 int requestId,
2055 const WebVector<WebString>& platforms, 2057 const WebVector<WebString>& platforms,
2056 WebAppBannerPromptReply* reply) { 2058 WebAppBannerPromptReply* reply) {
2057 if (!frame()) 2059 if (!frame())
2058 return; 2060 return;
2059 2061
2060 AppBannerController::willShowInstallBannerPrompt( 2062 AppBannerController::willShowInstallBannerPrompt(
2061 requestId, client()->appBannerClient(), frame(), platforms, reply); 2063 requestId, client()->appBannerClient(), frame(), platforms, reply);
2062 } 2064 }
2063 2065
2066 void WebLocalFrameImpl::onAppInstalled() {
2067 frame()->domWindow()->dispatchEvent(
2068 Event::create(EventTypeNames::appinstalled));
2069 }
2070
2064 void WebLocalFrameImpl::requestRunTask(WebSuspendableTask* task) const { 2071 void WebLocalFrameImpl::requestRunTask(WebSuspendableTask* task) const {
2065 DCHECK(frame()); 2072 DCHECK(frame());
2066 DCHECK(frame()->document()); 2073 DCHECK(frame()->document());
2067 frame()->document()->postSuspendableTask( 2074 frame()->document()->postSuspendableTask(
2068 WebSuspendableTaskWrapper::create(wrapUnique(task))); 2075 WebSuspendableTaskWrapper::create(wrapUnique(task)));
2069 } 2076 }
2070 2077
2071 void WebLocalFrameImpl::didCallAddSearchProvider() { 2078 void WebLocalFrameImpl::didCallAddSearchProvider() {
2072 UseCounter::count(frame(), UseCounter::ExternalAddSearchProvider); 2079 UseCounter::count(frame(), UseCounter::ExternalAddSearchProvider);
2073 } 2080 }
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
2340 feature = UseCounter::ChromeLoadTimesNpnNegotiatedProtocol; 2347 feature = UseCounter::ChromeLoadTimesNpnNegotiatedProtocol;
2341 } else if (metric == "wasAlternateProtocolAvailable") { 2348 } else if (metric == "wasAlternateProtocolAvailable") {
2342 feature = UseCounter::ChromeLoadTimesWasAlternateProtocolAvailable; 2349 feature = UseCounter::ChromeLoadTimesWasAlternateProtocolAvailable;
2343 } else if (metric == "connectionInfo") { 2350 } else if (metric == "connectionInfo") {
2344 feature = UseCounter::ChromeLoadTimesConnectionInfo; 2351 feature = UseCounter::ChromeLoadTimesConnectionInfo;
2345 } 2352 }
2346 UseCounter::count(frame(), feature); 2353 UseCounter::count(frame(), feature);
2347 } 2354 }
2348 2355
2349 } // namespace blink 2356 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698