Chromium Code Reviews| Index: chrome/browser/ui/views/apps/app_info_dialog/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/app_info_dialog_views.h |
| similarity index 48% |
| rename from chrome/browser/ui/views/apps/app_info_dialog_views.h |
| rename to chrome/browser/ui/views/apps/app_info_dialog/app_info_dialog_views.h |
| index 42dd93057a04eaddb0c9cd4630433758401b1822..507ad8816b639dde170405451c910f216d72e68f 100644 |
| --- a/chrome/browser/ui/views/apps/app_info_dialog_views.h |
| +++ b/chrome/browser/ui/views/apps/app_info_dialog/app_info_dialog_views.h |
| @@ -2,13 +2,11 @@ |
| // 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_VIEWS_H_ |
| -#define CHROME_BROWSER_UI_VIEWS_APPS_APP_INFO_DIALOG_VIEWS_H_ |
| +#ifndef CHROME_BROWSER_UI_VIEWS_APPS_APP_INFO_DIALOG_APP_INFO_DIALOG_VIEWS_H_ |
| +#define CHROME_BROWSER_UI_VIEWS_APPS_APP_INFO_DIALOG_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/gfx/native_widget_types.h" |
| +#include "ui/views/controls/tabbed_pane/tabbed_pane_listener.h" |
| #include "ui/views/window/dialog_delegate.h" |
| class Profile; |
| @@ -16,69 +14,49 @@ class Profile; |
| namespace extensions { |
| class Extension; |
| } |
| - |
| namespace views { |
| -class Label; |
| +class TabbedPane; |
| } |
| -// 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, |
|
Matt Giuca
2014/03/04 01:36:57
In general, the header file should have the same n
sashab
2014/03/04 04:10:58
Since this is soon to be implemented in cocoa, it
|
| - public base::SupportsWeakPtr<AppInfoView> { |
| + public views::TabbedPaneListener { |
| public: |
| - AppInfoView(Profile* profile, |
| + AppInfoView(gfx::NativeWindow parent_window, |
| + Profile* profile, |
| const extensions::Extension* app, |
| const base::Closure& close_callback); |
| - private: |
| virtual ~AppInfoView(); |
| + private: |
| // Overridden from views::View: |
| virtual gfx::Size GetPreferredSize() OVERRIDE; |
| // Overridden from views::DialogDelegate: |
| virtual bool Cancel() OVERRIDE; |
| - virtual base::string16 GetDialogButtonLabel(ui::DialogButton button) |
| - const OVERRIDE; |
| + virtual base::string16 GetDialogButtonLabel(ui::DialogButton button) const |
| + OVERRIDE; |
| virtual int GetDialogButtons() const OVERRIDE; |
| virtual bool IsDialogButtonEnabled(ui::DialogButton button) const OVERRIDE; |
| // Overridden from views::WidgetDelegate: |
| 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); |
| + // Overridden from views::TabbedPaneListener. |
| + virtual void TabSelectedAt(int index) OVERRIDE; |
| // 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; |
| - |
| + gfx::NativeWindow parent_window_; |
| const extensions::Extension* app_; |
| base::Closure close_callback_; |
| - base::WeakPtrFactory<AppInfoView> weak_ptr_factory_; |
| + // UI elements on the dialog. |
| + views::TabbedPane* tabbed_pane_; |
| DISALLOW_COPY_AND_ASSIGN(AppInfoView); |
| }; |
| -#endif // CHROME_BROWSER_UI_VIEWS_APPS_APP_INFO_DIALOG_VIEWS_H_ |
| +#endif // CHROME_BROWSER_UI_VIEWS_APPS_APP_INFO_DIALOG_APP_INFO_DIALOG_VIEWS_H_ |