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

Unified Diff: chrome/browser/ui/views/apps/app_info_dialog/arc_app_info_links_panel.h

Issue 2074543003: ARC: Add a link to "Manage supported links" in the Chrome app info dialog. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixes. Created 4 years, 6 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/ui/views/apps/app_info_dialog/arc_app_info_links_panel.h
diff --git a/chrome/browser/ui/views/apps/app_info_dialog/arc_app_info_links_panel.h b/chrome/browser/ui/views/apps/app_info_dialog/arc_app_info_links_panel.h
new file mode 100644
index 0000000000000000000000000000000000000000..ea30325165e11f7328db8be612149b0e807d4145
--- /dev/null
+++ b/chrome/browser/ui/views/apps/app_info_dialog/arc_app_info_links_panel.h
@@ -0,0 +1,54 @@
+// 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_UI_VIEWS_APPS_APP_INFO_DIALOG_ARC_APP_INFO_LINKS_PANEL_H_
+#define CHROME_BROWSER_UI_VIEWS_APPS_APP_INFO_DIALOG_ARC_APP_INFO_LINKS_PANEL_H_
+
+#include <stdint.h>
+
+#include <string>
+
+#include "base/macros.h"
+#include "base/scoped_observer.h"
+#include "chrome/browser/ui/app_list/arc/arc_app_list_prefs.h"
+#include "chrome/browser/ui/views/apps/app_info_dialog/app_info_panel.h"
+#include "ui/views/controls/link_listener.h"
+
+class Profile;
+
+namespace extensions {
+class Extension;
+}
+
+namespace views {
+class Link;
+}
+
+// Shows a link to get to managing supported links activity on ARC side.
+class ArcAppInfoLinksPanel : public AppInfoPanel,
+ public views::LinkListener,
+ public ArcAppListPrefs::Observer {
+ public:
+ ArcAppInfoLinksPanel(Profile* profile, const extensions::Extension* app);
+ ~ArcAppInfoLinksPanel() override;
+
+ private:
+ // views::LinkListener:
+ void LinkClicked(views::Link* source, int event_flags) override;
+
+ // ArcAppListPrefs::Observer:
+ void OnAppReadyChanged(const std::string& app_id, bool ready) override;
+ void OnAppRemoved(const std::string& app_id) override;
+ void OnAppRegistered(const std::string& app_id,
+ const ArcAppListPrefs::AppInfo& app_info) override;
+
+ void UpdateLink(bool enabled);
+
+ ScopedObserver<ArcAppListPrefs, ArcAppListPrefs::Observer> app_list_observer_;
+ views::Link* manage_link_;
+
+ DISALLOW_COPY_AND_ASSIGN(ArcAppInfoLinksPanel);
+};
+
+#endif // CHROME_BROWSER_UI_VIEWS_APPS_APP_INFO_DIALOG_ARC_APP_INFO_LINKS_PANEL_H_

Powered by Google App Engine
This is Rietveld 408576698