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

Unified Diff: chrome/browser/extensions/api/messaging/arc_support_host.h

Issue 1681813003: arc: Use incognito profile for OptIn and cookie fetcher (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased, added reseting windowClosedInternally before window creation Created 4 years, 10 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: chrome/browser/extensions/api/messaging/arc_support_host.h
diff --git a/chrome/browser/extensions/api/messaging/arc_support_host.h b/chrome/browser/extensions/api/messaging/arc_support_host.h
new file mode 100644
index 0000000000000000000000000000000000000000..84190de28d2d6005b174e6eeeae39f3212fe8c1b
--- /dev/null
+++ b/chrome/browser/extensions/api/messaging/arc_support_host.h
@@ -0,0 +1,40 @@
+// 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 CHROME_BROWSER_EXTENSIONS_API_MESSAGING_ARC_SUPPORT_HOST_H_
+#define CHROME_BROWSER_EXTENSIONS_API_MESSAGING_ARC_SUPPORT_HOST_H_
+
+#include "base/macros.h"
+#include "chrome/browser/chromeos/arc/arc_auth_service.h"
+#include "extensions/browser/api/messaging/native_message_host.h"
+
+// Supports communication with Arc support dialog.
+class ArcSupportHost : public extensions::NativeMessageHost,
+ public arc::ArcAuthService::Observer {
+ public:
+ static const char kHostName[];
+ static const char* const kHostOrigin[];
+
+ static scoped_ptr<NativeMessageHost> Create();
+
+ ~ArcSupportHost() override;
+
+ // Overrides NativeMessageHost:
+ void Start(Client* client) override;
+ void OnMessage(const std::string& request_string) override;
+ scoped_refptr<base::SingleThreadTaskRunner> task_runner() const override;
+
+ // Overrides arc::ArcAuthService::Observer:
+ void OnOptInUINeedToClose() override;
+
+ private:
+ // Unowned pointer.
+ Client* client_ = nullptr;
+
+ ArcSupportHost();
+
+ DISALLOW_COPY_AND_ASSIGN(ArcSupportHost);
+};
+
+#endif // CHROME_BROWSER_EXTENSIONS_API_MESSAGING_ARC_SUPPORT_HOST_H_

Powered by Google App Engine
This is Rietveld 408576698