Commit b88181d2 authored by sashab@chromium.org's avatar sashab@chromium.org

Move the version number in App Info Dialog to be next to app's name.

In the case where there is no 'view in webstore' link, place the version number on the following line. In the case where there is no version _or_ 'view in webstore' link, allow the title to take up multiple lines.

BUG=373053

Review URL: https://codereview.chromium.org/274443005

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@271537 0039d316-1c4b-4281-b951-d872f2087c98
parent 56b0b3ff
......@@ -28,6 +28,7 @@ class Event;
namespace views {
class Combobox;
class ImageView;
class Label;
class LabelButton;
}
......@@ -36,11 +37,9 @@ class LaunchOptionsComboboxModel;
// The Summary tab of the app info dialog, which provides basic information and
// controls related to the app.
class AppInfoSummaryTab : public AppInfoTab,
public views::LinkListener,
public views::ComboboxListener,
public views::ButtonListener,
public ExtensionUninstallDialog::Delegate,
public base::SupportsWeakPtr<AppInfoSummaryTab> {
public ExtensionUninstallDialog::Delegate {
public:
AppInfoSummaryTab(gfx::NativeWindow parent_window,
Profile* profile,
......@@ -50,8 +49,12 @@ class AppInfoSummaryTab : public AppInfoTab,
virtual ~AppInfoSummaryTab();
private:
// Overridden from views::LinkListener:
virtual void LinkClicked(views::Link* source, int event_flags) OVERRIDE;
// Internal initialisation methods.
void CreateDescriptionControl();
void CreateLaunchOptionControl();
void CreateButtons();
void LayoutButtons();
// Overridden from views::ComboboxListener:
virtual void OnPerformAction(views::Combobox* combobox) OVERRIDE;
......@@ -64,11 +67,6 @@ class AppInfoSummaryTab : public AppInfoTab,
virtual void ExtensionUninstallAccepted() OVERRIDE;
virtual void ExtensionUninstallCanceled() OVERRIDE;
// Load the app icon asynchronously. For the response, check OnAppImageLoaded.
void LoadAppImageAsync();
// Called when the app's icon is loaded.
void OnAppImageLoaded(const gfx::Image& image);
// Returns the launch type of the app (e.g. pinned tab, fullscreen, etc).
extensions::LaunchType GetLaunchType() const;
......@@ -77,11 +75,6 @@ class AppInfoSummaryTab : public AppInfoTab,
void SetLaunchType(extensions::LaunchType) const;
bool CanSetLaunchType() const;
// Opens the app in the web store. Must only be called if
// CanShowAppInWebStore() returns true.
void ShowAppInWebStore() const;
bool CanShowAppInWebStore() const;
// Uninstall the app. Must only be called if CanUninstallApp() returns true.
void UninstallApp();
bool CanUninstallApp() const;
......@@ -92,8 +85,8 @@ class AppInfoSummaryTab : public AppInfoTab,
bool CanCreateShortcuts() const;
// UI elements on the dialog.
views::ImageView* app_icon_;
views::Link* view_in_store_link_;
views::View* app_summary_panel_;
views::Label* app_description_label_;
views::LabelButton* create_shortcuts_button_;
scoped_ptr<ExtensionUninstallDialog> extension_uninstall_dialog_;
......@@ -102,8 +95,6 @@ class AppInfoSummaryTab : public AppInfoTab,
scoped_ptr<LaunchOptionsComboboxModel> launch_options_combobox_model_;
views::Combobox* launch_options_combobox_;
base::WeakPtrFactory<AppInfoSummaryTab> weak_ptr_factory_;
DISALLOW_COPY_AND_ASSIGN(AppInfoSummaryTab);
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment