Index: chrome/renderer/installation_service_impl.cc |
diff --git a/chrome/renderer/installation_service_impl.cc b/chrome/renderer/installation_service_impl.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..be27a68498e96d283970aa4f40a8aefdc01634db |
--- /dev/null |
+++ b/chrome/renderer/installation_service_impl.cc |
@@ -0,0 +1,30 @@ |
+// Copyright 2016 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#include "chrome/renderer/installation_service_impl.h" |
+ |
+#include <utility> |
+ |
+#include "base/memory/ptr_util.h" |
+#include "content/public/renderer/render_frame.h" |
+#include "mojo/public/cpp/bindings/strong_binding.h" |
+#include "third_party/WebKit/public/web/WebLocalFrame.h" |
+ |
+InstallationServiceImpl::InstallationServiceImpl( |
+ content::RenderFrame* render_frame) |
+ : render_frame_(render_frame) {} |
+ |
+// static |
+void InstallationServiceImpl::Create( |
+ content::RenderFrame* render_frame, |
+ blink::mojom::InstallationServiceRequest request) { |
+ mojo::MakeStrongBinding( |
+ base::MakeUnique<InstallationServiceImpl>(render_frame), |
+ std::move(request)); |
+} |
+ |
+void InstallationServiceImpl::OnInstall() { |
+ blink::WebLocalFrame* frame = render_frame_->GetWebFrame(); |
+ frame->onAppInstalled(); |
+} |