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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
diff --git a/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp b/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
index 4bd3bdce4c842217a659d4a8bbe73cdeedee763e..dd8c1026375bfda37a7794e26639e8d83d46cd90 100644
--- a/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
+++ b/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
@@ -98,6 +98,7 @@
#include "bindings/core/v8/V8Binding.h"
#include "bindings/core/v8/V8GCController.h"
#include "bindings/core/v8/V8PerIsolateData.h"
+#include "core/EventTypeNames.h"
#include "core/HTMLNames.h"
#include "core/dom/Document.h"
#include "core/dom/IconURL.h"
@@ -115,6 +116,7 @@
#include "core/editing/iterators/TextIterator.h"
#include "core/editing/serializers/Serialization.h"
#include "core/editing/spellcheck/SpellChecker.h"
+#include "core/events/Event.h"
#include "core/fetch/ResourceFetcher.h"
#include "core/fetch/SubstituteData.h"
#include "core/frame/FrameHost.h"
@@ -2061,6 +2063,11 @@ void WebLocalFrameImpl::willShowInstallBannerPrompt(
requestId, client()->appBannerClient(), frame(), platforms, reply);
}
+void WebLocalFrameImpl::onAppInstalled() {
+ frame()->domWindow()->dispatchEvent(
+ Event::create(EventTypeNames::appinstalled));
+}
+
void WebLocalFrameImpl::requestRunTask(WebSuspendableTask* task) const {
DCHECK(frame());
DCHECK(frame()->document());

Powered by Google App Engine
This is Rietveld 408576698