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

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

Issue 423363002: Add 'App Size' to App Info Dialog (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nit Created 6 years, 5 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/app_info_summary_panel.h
diff --git a/chrome/browser/ui/views/apps/app_info_dialog/app_info_summary_panel.h b/chrome/browser/ui/views/apps/app_info_dialog/app_info_summary_panel.h
index 0466cab3732a22bac44d5d7ca11ea6238b131caf..417cd99bc07e7a3a36e52cfcdebfe4c5a5aeaf9b 100644
--- a/chrome/browser/ui/views/apps/app_info_dialog/app_info_summary_panel.h
+++ b/chrome/browser/ui/views/apps/app_info_dialog/app_info_summary_panel.h
@@ -6,6 +6,7 @@
#define CHROME_BROWSER_UI_VIEWS_APPS_APP_INFO_DIALOG_APP_INFO_SUMMARY_PANEL_H_
#include "base/memory/scoped_ptr.h"
+#include "base/memory/weak_ptr.h"
#include "chrome/browser/ui/views/apps/app_info_dialog/app_info_panel.h"
#include "chrome/common/extensions/extension_constants.h"
#include "ui/views/controls/combobox/combobox_listener.h"
@@ -25,7 +26,8 @@ class Label;
// The summary panel of the app info dialog, which provides basic information
// and controls related to the app.
class AppInfoSummaryPanel : public AppInfoPanel,
- public views::ComboboxListener {
+ public views::ComboboxListener,
+ public base::SupportsWeakPtr<AppInfoSummaryPanel> {
public:
AppInfoSummaryPanel(Profile* profile, const extensions::Extension* app);
@@ -43,6 +45,11 @@ class AppInfoSummaryPanel : public AppInfoPanel,
// Overridden from views::ComboboxListener:
virtual void OnPerformAction(views::Combobox* combobox) OVERRIDE;
+ // Called asynchronously to calculate and update the size of the app displayed
+ // in the dialog.
+ void StartCalculatingAppSize();
+ void OnAppSizeCalculated(int64 app_size_in_bytes);
+
// Returns the time this app was installed.
base::Time GetInstalledTime() const;
@@ -63,6 +70,8 @@ class AppInfoSummaryPanel : public AppInfoPanel,
views::Label* description_label_;
views::Label* details_heading_;
+ views::Label* size_title_;
+ views::Label* size_value_;
views::Label* version_title_;
views::Label* version_value_;
views::Label* installed_time_title_;
@@ -73,6 +82,8 @@ class AppInfoSummaryPanel : public AppInfoPanel,
scoped_ptr<LaunchOptionsComboboxModel> launch_options_combobox_model_;
views::Combobox* launch_options_combobox_;
+ base::WeakPtrFactory<AppInfoSummaryPanel> weak_ptr_factory_;
+
DISALLOW_COPY_AND_ASSIGN(AppInfoSummaryPanel);
};
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/ui/views/apps/app_info_dialog/app_info_summary_panel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698