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

Side by Side Diff: chrome/browser/ui/views/apps/app_info_dialog/app_info_panel.h

Issue 580713002: Close the App Info Dialog if the app or profile becomes invalid (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Small fixes Created 6 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_UI_VIEWS_APPS_APP_INFO_DIALOG_APP_INFO_PANEL_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_APPS_APP_INFO_DIALOG_APP_INFO_PANEL_H_
6 #define CHROME_BROWSER_UI_VIEWS_APPS_APP_INFO_DIALOG_APP_INFO_PANEL_H_ 6 #define CHROME_BROWSER_UI_VIEWS_APPS_APP_INFO_DIALOG_APP_INFO_PANEL_H_
7 7
8 #include "ui/views/view.h" 8 #include "ui/views/view.h"
9 9
10 class Profile; 10 class Profile;
11 11
12 namespace extensions { 12 namespace extensions {
13 class Extension; 13 class Extension;
14 } 14 }
15 namespace views { 15 namespace views {
16 class Label; 16 class Label;
17 } 17 }
18 18
19 // A piece of the App Info dialog that displays information for a particular 19 // A piece of the App Info dialog that displays information for a particular
20 // profile and app. Panels in the App Info dialog extend this class. 20 // profile and app. Panels in the App Info dialog extend this class.
21 class AppInfoPanel : public views::View { 21 class AppInfoPanel : public views::View {
22 public: 22 public:
23 AppInfoPanel(Profile* profile, const extensions::Extension* app); 23 AppInfoPanel(Profile* profile, const extensions::Extension* app);
24 24
25 virtual ~AppInfoPanel(); 25 virtual ~AppInfoPanel();
26 26
27 protected: 27 protected:
28 // Closes the dialog.
29 void Close();
30
28 // Create a heading label with the given text. 31 // Create a heading label with the given text.
29 views::Label* CreateHeading(const base::string16& text) const; 32 views::Label* CreateHeading(const base::string16& text) const;
30 33
31 // Create a view with a vertically-stacked box layout, which can have child 34 // Create a view with a vertically-stacked box layout, which can have child
32 // views appended to it. |child_spacing| defaults to 35 // views appended to it. |child_spacing| defaults to
33 // |views::kRelatedControlVerticalSpacing|. 36 // |views::kRelatedControlVerticalSpacing|.
34 views::View* CreateVerticalStack(int child_spacing) const; 37 views::View* CreateVerticalStack(int child_spacing) const;
35 views::View* CreateVerticalStack() const; 38 views::View* CreateVerticalStack() const;
36 39
37 // Create a view with a horizontally-stacked box layout, which can have child 40 // Create a view with a horizontally-stacked box layout, which can have child
38 // views appended to it. |child_spacing| defaults to the spacing between 41 // views appended to it. |child_spacing| defaults to the spacing between
39 // related horizontal controls. 42 // related horizontal controls.
40 views::View* CreateHorizontalStack(int child_spacing) const; 43 views::View* CreateHorizontalStack(int child_spacing) const;
41 views::View* CreateHorizontalStack() const; 44 views::View* CreateHorizontalStack() const;
42 45
43 // Given a key and a value, displays them side-by-side as a field and its 46 // Given a key and a value, displays them side-by-side as a field and its
44 // value. 47 // value.
45 views::View* CreateKeyValueField(views::View* key, views::View* value) const; 48 views::View* CreateKeyValueField(views::View* key, views::View* value) const;
46 49
47 Profile* profile_; 50 Profile* profile_;
48 const extensions::Extension* app_; 51 const extensions::Extension* app_;
49 52
50 private: 53 private:
51 DISALLOW_COPY_AND_ASSIGN(AppInfoPanel); 54 DISALLOW_COPY_AND_ASSIGN(AppInfoPanel);
52 }; 55 };
53 56
54 #endif // CHROME_BROWSER_UI_VIEWS_APPS_APP_INFO_DIALOG_APP_INFO_PANEL_H_ 57 #endif // CHROME_BROWSER_UI_VIEWS_APPS_APP_INFO_DIALOG_APP_INFO_PANEL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698