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

Unified Diff: components/arc/intent_helper/arc_intent_helper_bridge.cc

Issue 1843563003: Move arc_intent_helper_bridge.h from c/b/chromeos/ to components/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address a comment Created 4 years, 9 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: components/arc/intent_helper/arc_intent_helper_bridge.cc
diff --git a/components/arc/intent_helper/arc_intent_helper_bridge.cc b/components/arc/intent_helper/arc_intent_helper_bridge.cc
new file mode 100644
index 0000000000000000000000000000000000000000..5c962df9734bfe8824862a562475f1c7fde77aea
--- /dev/null
+++ b/components/arc/intent_helper/arc_intent_helper_bridge.cc
@@ -0,0 +1,32 @@
+// 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 "components/arc/intent_helper/arc_intent_helper_bridge.h"
+
+#include "ash/shell.h"
+#include "ash/shell_delegate.h"
+#include "url/gurl.h"
+
+namespace arc {
+
+ArcIntentHelperBridge::ArcIntentHelperBridge(ArcBridgeService* bridge_service)
+ : ArcService(bridge_service), binding_(this) {
+ arc_bridge_service()->AddObserver(this);
+}
+
+ArcIntentHelperBridge::~ArcIntentHelperBridge() {
+ arc_bridge_service()->RemoveObserver(this);
+}
+
+void ArcIntentHelperBridge::OnIntentHelperInstanceReady() {
+ arc_bridge_service()->intent_helper_instance()->Init(
+ binding_.CreateInterfacePtrAndBind());
+}
+
+void ArcIntentHelperBridge::OnOpenUrl(const mojo::String& url) {
+ GURL gurl(url.get());
+ ash::Shell::GetInstance()->delegate()->OpenUrl(gurl);
+}
+
+} // namespace arc
« no previous file with comments | « components/arc/intent_helper/arc_intent_helper_bridge.h ('k') | components/arc/intent_helper/font_size_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698