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

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

Issue 1570153003: Use MacViews for ContentSettingBubbles. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits for tapted Created 4 years, 11 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 (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/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "components/content_settings/core/common/content_settings_types.h" 12 #include "components/content_settings/core/common/content_settings_types.h"
13 #include "content/public/browser/web_contents_observer.h" 13 #include "content/public/browser/web_contents_observer.h"
14 #include "content/public/common/media_stream_request.h" 14 #include "content/public/common/media_stream_request.h"
15 #include "ui/views/bubble/bubble_delegate.h" 15 #include "ui/views/bubble/bubble_delegate.h"
16 #include "ui/views/controls/button/button.h" 16 #include "ui/views/controls/button/button.h"
17 #include "ui/views/controls/button/menu_button_listener.h" 17 #include "ui/views/controls/button/menu_button_listener.h"
18 #include "ui/views/controls/link_listener.h" 18 #include "ui/views/controls/link_listener.h"
19 19
20 class ContentSettingBubbleModel; 20 class ContentSettingBubbleModel;
21 class ContentSettingMediaMenuModel; 21 class ContentSettingMediaMenuModel;
22 class Profile; 22 class Profile;
23 23
24 namespace chrome {
25 class ContentSettingBubbleViewsBridge;
26 }
27
24 namespace ui { 28 namespace ui {
25 class SimpleMenuModel; 29 class SimpleMenuModel;
26 } 30 }
27 31
28 namespace views { 32 namespace views {
29 class LabelButton; 33 class LabelButton;
30 class MenuButton; 34 class MenuButton;
31 class MenuRunner; 35 class MenuRunner;
32 class RadioButton; 36 class RadioButton;
33 } 37 }
(...skipping 27 matching lines...) Expand all
61 const std::string& label); 65 const std::string& label);
62 66
63 protected: 67 protected:
64 // views::BubbleDelegateView: 68 // views::BubbleDelegateView:
65 void Init() override; 69 void Init() override;
66 70
67 private: 71 private:
68 class Favicon; 72 class Favicon;
69 struct MediaMenuParts; 73 struct MediaMenuParts;
70 74
75 // This allows ContentSettingBubbleViewsBridge to call SetAnchorRect().
76 friend class chrome::ContentSettingBubbleViewsBridge;
77
71 typedef std::map<views::Link*, int> ListItemLinks; 78 typedef std::map<views::Link*, int> ListItemLinks;
72 typedef std::map<views::MenuButton*, MediaMenuParts*> MediaMenuPartsMap; 79 typedef std::map<views::MenuButton*, MediaMenuParts*> MediaMenuPartsMap;
73 80
74 // content::WebContentsObserver: 81 // content::WebContentsObserver:
75 void DidNavigateMainFrame( 82 void DidNavigateMainFrame(
76 const content::LoadCommittedDetails& details, 83 const content::LoadCommittedDetails& details,
77 const content::FrameNavigateParams& params) override; 84 const content::FrameNavigateParams& params) override;
78 85
79 // views::ButtonListener: 86 // views::ButtonListener:
80 void ButtonPressed(views::Button* sender, const ui::Event& event) override; 87 void ButtonPressed(views::Button* sender, const ui::Event& event) override;
(...skipping 20 matching lines...) Expand all
101 views::Link* manage_link_; 108 views::Link* manage_link_;
102 views::Link* learn_more_link_; 109 views::Link* learn_more_link_;
103 views::LabelButton* close_button_; 110 views::LabelButton* close_button_;
104 scoped_ptr<views::MenuRunner> menu_runner_; 111 scoped_ptr<views::MenuRunner> menu_runner_;
105 MediaMenuPartsMap media_menus_; 112 MediaMenuPartsMap media_menus_;
106 113
107 DISALLOW_IMPLICIT_CONSTRUCTORS(ContentSettingBubbleContents); 114 DISALLOW_IMPLICIT_CONSTRUCTORS(ContentSettingBubbleContents);
108 }; 115 };
109 116
110 #endif // CHROME_BROWSER_UI_VIEWS_CONTENT_SETTING_BUBBLE_CONTENTS_H_ 117 #endif // CHROME_BROWSER_UI_VIEWS_CONTENT_SETTING_BUBBLE_CONTENTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698