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

Unified Diff: chrome/browser/ui/views/apps/app_info_dialog_views.h

Issue 146583010: Extend App Info dialog to include app shortcut and list of permissions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Small code refactor Created 6 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
« no previous file with comments | « no previous file | chrome/browser/ui/views/apps/app_info_dialog_views.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/apps/app_info_dialog_views.h
diff --git a/chrome/browser/ui/views/apps/app_info_dialog_views.h b/chrome/browser/ui/views/apps/app_info_dialog_views.h
index 8187a8729b1491bc68132fbde858d88247e8aab5..42dd93057a04eaddb0c9cd4630433758401b1822 100644
--- a/chrome/browser/ui/views/apps/app_info_dialog_views.h
+++ b/chrome/browser/ui/views/apps/app_info_dialog_views.h
@@ -6,6 +6,9 @@
#define CHROME_BROWSER_UI_VIEWS_APPS_APP_INFO_DIALOG_VIEWS_H_
#include "base/compiler_specific.h"
+#include "chrome/browser/shell_integration.h"
+#include "ui/message_center/views/bounded_scroll_view.h"
+#include "ui/views/controls/image_view.h"
#include "ui/views/window/dialog_delegate.h"
class Profile;
@@ -18,8 +21,22 @@ namespace views {
class Label;
}
+// A scrollable list of permissions for the given app.
+class PermissionsScrollView : public message_center::BoundedScrollView {
+ public:
+ PermissionsScrollView(int min_height,
+ int max_height,
+ const extensions::Extension* app);
+
+ private:
+ virtual ~PermissionsScrollView();
+
+ views::View* inner_scrollable_view;
+};
+
// View the information about a particular chrome application.
-class AppInfoView : public views::DialogDelegateView {
+class AppInfoView : public views::DialogDelegateView,
+ public base::SupportsWeakPtr<AppInfoView> {
public:
AppInfoView(Profile* profile,
const extensions::Extension* app,
@@ -42,16 +59,25 @@ class AppInfoView : public views::DialogDelegateView {
virtual ui::ModalType GetModalType() const OVERRIDE;
virtual base::string16 GetWindowTitle() const OVERRIDE;
+ // Called when the app's icon is loaded.
+ void OnAppImageLoaded(const gfx::Image& image);
+
// Profile in which the shortcuts will be created.
Profile* profile_;
// UI elements on the dialog.
views::Label* app_name_label;
views::Label* app_description_label;
+ views::Label* app_version_label;
+ views::ImageView* app_icon;
+ views::Label* permission_list_heading;
+ PermissionsScrollView* permissions_scroll_view;
const extensions::Extension* app_;
base::Closure close_callback_;
+ base::WeakPtrFactory<AppInfoView> weak_ptr_factory_;
+
DISALLOW_COPY_AND_ASSIGN(AppInfoView);
};
« no previous file with comments | « no previous file | chrome/browser/ui/views/apps/app_info_dialog_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698