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

Side by Side Diff: chrome/browser/ui/views/content_setting_bubble_contents.h

Issue 387313005: views: Make the menu size the same as the menubutton size in the media bubble. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixup Created 6 years, 5 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_CONTENT_SETTING_BUBBLE_CONTENTS_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_CONTENT_SETTING_BUBBLE_CONTENTS_H_
6 #define CHROME_BROWSER_UI_VIEWS_CONTENT_SETTING_BUBBLE_CONTENTS_H_ 6 #define CHROME_BROWSER_UI_VIEWS_CONTENT_SETTING_BUBBLE_CONTENTS_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 struct MediaMenuParts; 69 struct MediaMenuParts;
70 70
71 typedef std::map<views::Link*, int> PopupLinks; 71 typedef std::map<views::Link*, int> PopupLinks;
72 typedef std::map<views::MenuButton*, MediaMenuParts*> MediaMenuPartsMap; 72 typedef std::map<views::MenuButton*, MediaMenuParts*> MediaMenuPartsMap;
73 73
74 // content::WebContentsObserver: 74 // content::WebContentsObserver:
75 virtual void DidNavigateMainFrame( 75 virtual void DidNavigateMainFrame(
76 const content::LoadCommittedDetails& details, 76 const content::LoadCommittedDetails& details,
77 const content::FrameNavigateParams& params) OVERRIDE; 77 const content::FrameNavigateParams& params) OVERRIDE;
78 78
79 // views::View:
80 virtual void OnNativeThemeChanged(const ui::NativeTheme* theme) OVERRIDE;
81
79 // views::ButtonListener: 82 // views::ButtonListener:
80 virtual void ButtonPressed(views::Button* sender, 83 virtual void ButtonPressed(views::Button* sender,
81 const ui::Event& event) OVERRIDE; 84 const ui::Event& event) OVERRIDE;
82 85
83 // views::LinkListener: 86 // views::LinkListener:
84 virtual void LinkClicked(views::Link* source, int event_flags) OVERRIDE; 87 virtual void LinkClicked(views::Link* source, int event_flags) OVERRIDE;
85 88
86 // views::MenuButtonListener: 89 // views::MenuButtonListener:
87 virtual void OnMenuButtonClicked(views::View* source, 90 virtual void OnMenuButtonClicked(views::View* source,
88 const gfx::Point& point) OVERRIDE; 91 const gfx::Point& point) OVERRIDE;
89 92
90 // Helper to get the preferred width of the media menu. 93 // Helper to get the preferred width of the media menu.
91 int GetPreferredMediaMenuWidth(views::MenuButton* button, 94 void UpdateMenuButtonSizes(const ui::NativeTheme* theme);
92 ui::SimpleMenuModel* menu_model);
93 95
94 // Provides data for this bubble. 96 // Provides data for this bubble.
95 scoped_ptr<ContentSettingBubbleModel> content_setting_bubble_model_; 97 scoped_ptr<ContentSettingBubbleModel> content_setting_bubble_model_;
96 98
97 // Some of our controls, so we can tell what's been clicked when we get a 99 // Some of our controls, so we can tell what's been clicked when we get a
98 // message. 100 // message.
99 PopupLinks popup_links_; 101 PopupLinks popup_links_;
100 typedef std::vector<views::RadioButton*> RadioGroup; 102 typedef std::vector<views::RadioButton*> RadioGroup;
101 RadioGroup radio_group_; 103 RadioGroup radio_group_;
102 views::Link* custom_link_; 104 views::Link* custom_link_;
103 views::Link* manage_link_; 105 views::Link* manage_link_;
104 views::Link* learn_more_link_; 106 views::Link* learn_more_link_;
105 views::LabelButton* close_button_; 107 views::LabelButton* close_button_;
106 scoped_ptr<views::MenuRunner> menu_runner_; 108 scoped_ptr<views::MenuRunner> menu_runner_;
107 MediaMenuPartsMap media_menus_; 109 MediaMenuPartsMap media_menus_;
108 110
109 DISALLOW_IMPLICIT_CONSTRUCTORS(ContentSettingBubbleContents); 111 DISALLOW_IMPLICIT_CONSTRUCTORS(ContentSettingBubbleContents);
110 }; 112 };
111 113
112 #endif // CHROME_BROWSER_UI_VIEWS_CONTENT_SETTING_BUBBLE_CONTENTS_H_ 114 #endif // CHROME_BROWSER_UI_VIEWS_CONTENT_SETTING_BUBBLE_CONTENTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698