OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
Devlin
2014/09/02 21:07:51
(comment inserted at random location)
I think ther
gpdavis
2014/09/04 19:40:04
Yep; I'm aware of the cocoa file for this as well.
| |
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_EXTENSIONS_EXTENSION_INSTALL_DIALOG_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_EXTENSIONS_EXTENSION_INSTALL_DIALOG_VIEW_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_EXTENSIONS_EXTENSION_INSTALL_DIALOG_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_EXTENSIONS_EXTENSION_INSTALL_DIALOG_VIEW_H_ |
7 | 7 |
8 #include "chrome/browser/extensions/extension_install_prompt.h" | 8 #include "chrome/browser/extensions/extension_install_prompt.h" |
9 #include "ui/base/resource/resource_bundle.h" | |
9 #include "ui/gfx/animation/animation_delegate.h" | 10 #include "ui/gfx/animation/animation_delegate.h" |
10 #include "ui/gfx/animation/slide_animation.h" | 11 #include "ui/gfx/animation/slide_animation.h" |
11 #include "ui/views/controls/button/button.h" | 12 #include "ui/views/controls/button/button.h" |
12 #include "ui/views/controls/link_listener.h" | 13 #include "ui/views/controls/link_listener.h" |
13 #include "ui/views/view.h" | 14 #include "ui/views/view.h" |
14 #include "ui/views/window/dialog_delegate.h" | 15 #include "ui/views/window/dialog_delegate.h" |
15 | 16 |
16 typedef std::vector<base::string16> PermissionDetails; | 17 typedef std::vector<base::string16> PermissionDetails; |
17 class ExpandableContainerView; | 18 class ExpandableContainerView; |
18 | 19 |
(...skipping 28 matching lines...) Expand all Loading... | |
47 class ExtensionInstallDialogView : public views::DialogDelegateView, | 48 class ExtensionInstallDialogView : public views::DialogDelegateView, |
48 public views::LinkListener, | 49 public views::LinkListener, |
49 public views::ButtonListener { | 50 public views::ButtonListener { |
50 public: | 51 public: |
51 ExtensionInstallDialogView( | 52 ExtensionInstallDialogView( |
52 content::PageNavigator* navigator, | 53 content::PageNavigator* navigator, |
53 ExtensionInstallPrompt::Delegate* delegate, | 54 ExtensionInstallPrompt::Delegate* delegate, |
54 scoped_refptr<ExtensionInstallPrompt::Prompt> prompt); | 55 scoped_refptr<ExtensionInstallPrompt::Prompt> prompt); |
55 virtual ~ExtensionInstallDialogView(); | 56 virtual ~ExtensionInstallDialogView(); |
56 | 57 |
58 void InitView(); | |
Devlin
2014/09/02 21:07:51
Comments.
gpdavis
2014/09/04 19:40:04
Wasn't sure what to say about this, since there we
| |
59 | |
60 bool MaybeAddPermissions(views::GridLayout* layout, | |
Devlin
2014/09/02 21:07:51
Is there a reason these two functions should be pu
Devlin
2014/09/02 21:07:51
Comments
gpdavis
2014/09/04 19:40:04
No there is not. My mistake. Done.
gpdavis
2014/09/04 19:40:04
How about...
"Adds permissions of |perm_type| to
| |
61 ui::ResourceBundle& rb, | |
Devlin
2014/09/02 21:07:51
Just forward-declare resource bundle, rather than
gpdavis
2014/09/04 19:40:04
Done.
| |
62 int column_set_id, | |
63 int left_column_width, | |
64 ExtensionInstallPrompt::PermissionsType perm_type); | |
65 | |
57 // Returns the interior ScrollView of the dialog. This allows us to inspect | 66 // Returns the interior ScrollView of the dialog. This allows us to inspect |
58 // the contents of the DialogView. | 67 // the contents of the DialogView. |
59 const views::ScrollView* scroll_view() const { return scroll_view_; } | 68 const views::ScrollView* scroll_view() const { return scroll_view_; } |
60 | 69 |
61 // Called when one of the child elements has expanded/collapsed. | 70 // Called when one of the child elements has expanded/collapsed. |
62 void ContentsChanged(); | 71 void ContentsChanged(); |
63 | 72 |
64 private: | 73 private: |
65 // views::DialogDelegateView: | 74 // views::DialogDelegateView: |
66 virtual int GetDialogButtons() const OVERRIDE; | 75 virtual int GetDialogButtons() const OVERRIDE; |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
254 | 263 |
255 DISALLOW_COPY_AND_ASSIGN(ExpandableContainerView); | 264 DISALLOW_COPY_AND_ASSIGN(ExpandableContainerView); |
256 }; | 265 }; |
257 | 266 |
258 void ShowExtensionInstallDialogImpl( | 267 void ShowExtensionInstallDialogImpl( |
259 const ExtensionInstallPrompt::ShowParams& show_params, | 268 const ExtensionInstallPrompt::ShowParams& show_params, |
260 ExtensionInstallPrompt::Delegate* delegate, | 269 ExtensionInstallPrompt::Delegate* delegate, |
261 scoped_refptr<ExtensionInstallPrompt::Prompt> prompt); | 270 scoped_refptr<ExtensionInstallPrompt::Prompt> prompt); |
262 | 271 |
263 #endif // CHROME_BROWSER_UI_VIEWS_EXTENSIONS_EXTENSION_INSTALL_DIALOG_VIEW_H_ | 272 #endif // CHROME_BROWSER_UI_VIEWS_EXTENSIONS_EXTENSION_INSTALL_DIALOG_VIEW_H_ |
OLD | NEW |