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

Side by Side Diff: chrome/browser/ui/views/extensions/extension_install_dialog_view.h

Issue 501273002: Update extension install prompt to reflect withheld permissions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Minor changes Created 6 years, 3 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_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/gfx/animation/animation_delegate.h" 9 #include "ui/gfx/animation/animation_delegate.h"
10 #include "ui/gfx/animation/slide_animation.h" 10 #include "ui/gfx/animation/slide_animation.h"
11 #include "ui/views/controls/button/button.h" 11 #include "ui/views/controls/button/button.h"
12 #include "ui/views/controls/link_listener.h" 12 #include "ui/views/controls/link_listener.h"
13 #include "ui/views/view.h" 13 #include "ui/views/view.h"
14 #include "ui/views/window/dialog_delegate.h" 14 #include "ui/views/window/dialog_delegate.h"
15 15
16 typedef std::vector<base::string16> PermissionDetails; 16 typedef std::vector<base::string16> PermissionDetails;
17 class ExpandableContainerView; 17 class ExpandableContainerView;
18 18
19 namespace content { 19 namespace content {
20 class PageNavigator; 20 class PageNavigator;
21 } 21 }
22 22
23 namespace extensions { 23 namespace extensions {
24 class ExperienceSamplingEvent; 24 class ExperienceSamplingEvent;
25 } 25 }
26 26
27 namespace ui {
28 class ResourceBundle;
29 }
30
27 namespace views { 31 namespace views {
28 class GridLayout; 32 class GridLayout;
29 class ImageButton; 33 class ImageButton;
30 class Label; 34 class Label;
31 class Link; 35 class Link;
32 } 36 }
33 37
34 // A custom scrollable view implementation for the dialog. 38 // A custom scrollable view implementation for the dialog.
35 class CustomScrollableView : public views::View { 39 class CustomScrollableView : public views::View {
36 public: 40 public:
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 // views::LinkListener: 83 // views::LinkListener:
80 virtual void LinkClicked(views::Link* source, int event_flags) OVERRIDE; 84 virtual void LinkClicked(views::Link* source, int event_flags) OVERRIDE;
81 85
82 // views::ButtonListener: 86 // views::ButtonListener:
83 virtual void ButtonPressed(views::Button* sender, 87 virtual void ButtonPressed(views::Button* sender,
84 const ui::Event& event) OVERRIDE; 88 const ui::Event& event) OVERRIDE;
85 89
86 // Experimental: Toggles inline permission explanations with an animation. 90 // Experimental: Toggles inline permission explanations with an animation.
87 void ToggleInlineExplanations(); 91 void ToggleInlineExplanations();
88 92
93 // Initializes the dialog view, adding in permissions if they exist.
94 void InitView();
95
96 // Adds permissions of |perm_type| to the dialog view if they exist.
97 bool AddPermissions(views::GridLayout* layout,
98 ui::ResourceBundle& rb,
99 int column_set_id,
100 int left_column_width,
101 ExtensionInstallPrompt::PermissionsType perm_type);
102
89 // Creates a layout consisting of dialog header, extension name and icon. 103 // Creates a layout consisting of dialog header, extension name and icon.
90 views::GridLayout* CreateLayout( 104 views::GridLayout* CreateLayout(
91 views::View* parent, 105 views::View* parent,
92 int left_column_width, 106 int left_column_width,
93 int column_set_id, 107 int column_set_id,
94 bool single_detail_row) const; 108 bool single_detail_row) const;
95 109
96 bool is_inline_install() const { 110 bool is_inline_install() const {
97 return prompt_->type() == ExtensionInstallPrompt::INLINE_INSTALL_PROMPT; 111 return prompt_->type() == ExtensionInstallPrompt::INLINE_INSTALL_PROMPT;
98 } 112 }
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 268
255 DISALLOW_COPY_AND_ASSIGN(ExpandableContainerView); 269 DISALLOW_COPY_AND_ASSIGN(ExpandableContainerView);
256 }; 270 };
257 271
258 void ShowExtensionInstallDialogImpl( 272 void ShowExtensionInstallDialogImpl(
259 const ExtensionInstallPrompt::ShowParams& show_params, 273 const ExtensionInstallPrompt::ShowParams& show_params,
260 ExtensionInstallPrompt::Delegate* delegate, 274 ExtensionInstallPrompt::Delegate* delegate,
261 scoped_refptr<ExtensionInstallPrompt::Prompt> prompt); 275 scoped_refptr<ExtensionInstallPrompt::Prompt> prompt);
262 276
263 #endif // CHROME_BROWSER_UI_VIEWS_EXTENSIONS_EXTENSION_INSTALL_DIALOG_VIEW_H_ 277 #endif // CHROME_BROWSER_UI_VIEWS_EXTENSIONS_EXTENSION_INSTALL_DIALOG_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698