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

Side by Side Diff: third_party/WebKit/Source/modules/installation/InstallationServiceImpl.cpp

Issue 2379923002: Implement "appinstalled" event on Android. (Closed)
Patch Set: Fix up some includes. Created 4 years 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
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "modules/installation/InstallationServiceImpl.h"
6
7 #include "core/events/Event.h"
8 #include "core/frame/LocalDOMWindow.h"
haraken 2016/12/15 07:27:50 unused
Matt Giuca 2016/12/16 03:53:46 m_frame->domWindow() is a LocalDOMWindow, so I nee
9 #include "core/frame/LocalFrame.h"
10 #include "mojo/public/cpp/bindings/strong_binding.h"
11 #include "wtf/PtrUtil.h"
12 #include <utility>
haraken 2016/12/15 07:27:50 unused ?
Matt Giuca 2016/12/16 03:53:46 std::move is in <utility>
13
14 namespace blink {
15
16 InstallationServiceImpl::InstallationServiceImpl(LocalFrame& frame)
17 : m_frame(frame) {}
18
19 // static
20 void InstallationServiceImpl::create(
21 LocalFrame* frame,
22 mojom::blink::InstallationServiceRequest request) {
23 mojo::MakeStrongBinding(WTF::makeUnique<InstallationServiceImpl>(*frame),
24 std::move(request));
25 }
26
27 void InstallationServiceImpl::OnInstall() {
28 m_frame->domWindow()->dispatchEvent(
haraken 2016/12/15 07:27:50 You need to check if (m_frame && m_frame->domWindo
Matt Giuca 2016/12/16 03:53:46 Done.
29 Event::create(EventTypeNames::appinstalled));
30 }
31
32 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698