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

Unified Diff: components/arc/test/fake_intent_helper_instance.h

Issue 2306673002: arc: update proxy settings from UI and ONC policy. (Closed)
Patch Set: Fixed a comment. Created 4 years, 3 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
« no previous file with comments | « components/arc/BUILD.gn ('k') | components/arc/test/fake_intent_helper_instance.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/arc/test/fake_intent_helper_instance.h
diff --git a/components/arc/test/fake_intent_helper_instance.h b/components/arc/test/fake_intent_helper_instance.h
new file mode 100644
index 0000000000000000000000000000000000000000..801125bc89f76ac447b545906a1f57f71442c123
--- /dev/null
+++ b/components/arc/test/fake_intent_helper_instance.h
@@ -0,0 +1,87 @@
+// 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.
+
+#ifndef COMPONENTS_ARC_TEST_FAKE_INTENT_HELPER_INSTANCE_H_
+#define COMPONENTS_ARC_TEST_FAKE_INTENT_HELPER_INSTANCE_H_
+
+#include <string>
+#include <vector>
+
+#include "base/callback.h"
+#include "components/arc/common/intent_helper.mojom.h"
+#include "components/arc/test/fake_arc_bridge_instance.h"
+#include "mojo/public/cpp/bindings/binding.h"
+
+namespace arc {
+
+class FakeIntentHelperInstance : public mojom::IntentHelperInstance {
+ public:
+ FakeIntentHelperInstance();
+
+ class Broadcast {
+ public:
+ Broadcast(const mojo::String& action,
+ const mojo::String& package_name,
+ const mojo::String& cls,
+ const mojo::String& extras);
+
+ ~Broadcast();
+
+ Broadcast(const Broadcast& broadcast);
+
+ std::string action;
+ std::string package_name;
+ std::string cls;
+ std::string extras;
+ };
+
+ void clear_broadcasts() { broadcasts_.clear(); }
+
+ const std::vector<Broadcast>& broadcasts() const { return broadcasts_; }
+
+ // mojom::HelpIntentInstance:
+ ~FakeIntentHelperInstance() override;
+
+ void AddPreferredPackage(const mojo::String& package_name) override;
+
+ void HandleUrl(const mojo::String& url,
+ const mojo::String& package_name) override;
+
+ void HandleUrlList(mojo::Array<mojom::UrlWithMimeTypePtr> urls,
+ mojom::ActivityNamePtr activity,
+ mojom::ActionType action) override;
+
+ void HandleUrlListDeprecated(mojo::Array<mojom::UrlWithMimeTypePtr> urls,
+ const mojo::String& package_name,
+ mojom::ActionType action) override;
+
+ void Init(mojom::IntentHelperHostPtr host_ptr) override;
+
+ void RequestActivityIcons(
+ mojo::Array<mojom::ActivityNamePtr> activities,
+ ::arc::mojom::ScaleFactor scale_factor,
+ const RequestActivityIconsCallback& callback) override;
+
+ void RequestUrlHandlerList(
+ const mojo::String& url,
+ const RequestUrlHandlerListCallback& callback) override;
+
+ void RequestUrlListHandlerList(
+ mojo::Array<mojom::UrlWithMimeTypePtr> urls,
+ const RequestUrlListHandlerListCallback& callback) override;
+
+ void SendBroadcast(const mojo::String& action,
+ const mojo::String& package_name,
+ const mojo::String& cls,
+ const mojo::String& extras) override;
+
+ private:
+ std::vector<Broadcast> broadcasts_;
+
+ DISALLOW_COPY_AND_ASSIGN(FakeIntentHelperInstance);
+};
+
+} // namespace arc
+
+#endif // COMPONENTS_ARC_TEST_FAKE_POLICY_INSTANCE_H_
« no previous file with comments | « components/arc/BUILD.gn ('k') | components/arc/test/fake_intent_helper_instance.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698