OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_BROWSER_DIALOGS_H_ | 5 #ifndef CHROME_BROWSER_UI_BROWSER_DIALOGS_H_ |
6 #define CHROME_BROWSER_UI_BROWSER_DIALOGS_H_ | 6 #define CHROME_BROWSER_UI_BROWSER_DIALOGS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/callback.h" | 12 #include "base/callback.h" |
13 #include "base/optional.h" | 13 #include "base/optional.h" |
14 #include "base/strings/string16.h" | 14 #include "base/strings/string16.h" |
15 #include "build/build_config.h" | 15 #include "build/build_config.h" |
16 #include "chrome/browser/ui/bookmarks/bookmark_editor.h" | 16 #include "chrome/browser/ui/bookmarks/bookmark_editor.h" |
17 #include "third_party/skia/include/core/SkColor.h" | 17 #include "third_party/skia/include/core/SkColor.h" |
18 #include "ui/gfx/native_widget_types.h" | 18 #include "ui/gfx/native_widget_types.h" |
19 | 19 |
20 #if defined(OS_CHROMEOS) | 20 #if defined(OS_CHROMEOS) |
21 #include "chrome/browser/chromeos/arc/intent_helper/arc_navigation_throttle.h" | 21 #include "chrome/browser/chromeos/arc/intent_helper/arc_navigation_throttle.h" |
22 #endif // OS_CHROMEOS | 22 #endif // OS_CHROMEOS |
23 | 23 |
24 #if defined(OS_MACOSX) | |
25 class LocationBarDecoration; | |
26 #endif | |
27 | |
24 class Browser; | 28 class Browser; |
25 class ContentSettingBubbleModel; | 29 class ContentSettingBubbleModel; |
26 class GURL; | 30 class GURL; |
27 class LoginHandler; | 31 class LoginHandler; |
28 class Profile; | 32 class Profile; |
29 | 33 |
30 namespace bookmarks { | 34 namespace bookmarks { |
31 class BookmarkBubbleObserver; | 35 class BookmarkBubbleObserver; |
32 } | 36 } |
33 | 37 |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
116 SkColor initial_color); | 120 SkColor initial_color); |
117 | 121 |
118 #if defined(OS_MACOSX) | 122 #if defined(OS_MACOSX) |
119 | 123 |
120 // Shows a Views page info bubble at the given anchor point. | 124 // Shows a Views page info bubble at the given anchor point. |
121 void ShowPageInfoBubbleViewsAtPoint( | 125 void ShowPageInfoBubbleViewsAtPoint( |
122 const gfx::Point& anchor_point, | 126 const gfx::Point& anchor_point, |
123 Profile* profile, | 127 Profile* profile, |
124 content::WebContents* web_contents, | 128 content::WebContents* web_contents, |
125 const GURL& virtual_url, | 129 const GURL& virtual_url, |
126 const security_state::SecurityInfo& security_info); | 130 const security_state::SecurityInfo& security_info, |
131 LocationBarDecoration* decoration); | |
sky
2017/05/19 14:53:22
The code in c/b/ui shouldn't know about platform s
spqchan
2017/05/19 17:44:55
Done.
tapted
2017/05/21 08:15:28
Ooh interesting. I think the fact that we can even
| |
127 | 132 |
128 // Show a Views bookmark bubble at the given point. This occurs when the | 133 // Show a Views bookmark bubble at the given point. This occurs when the |
129 // bookmark star is clicked or "Bookmark This Page..." is selected from a menu | 134 // bookmark star is clicked or "Bookmark This Page..." is selected from a menu |
130 // or via a key equivalent. | 135 // or via a key equivalent. |
131 void ShowBookmarkBubbleViewsAtPoint(const gfx::Point& anchor_point, | 136 void ShowBookmarkBubbleViewsAtPoint(const gfx::Point& anchor_point, |
132 gfx::NativeView parent, | 137 gfx::NativeView parent, |
133 bookmarks::BookmarkBubbleObserver* observer, | 138 bookmarks::BookmarkBubbleObserver* observer, |
134 Browser* browser, | 139 Browser* browser, |
135 const GURL& url, | 140 const GURL& url, |
136 bool newly_bookmarked); | 141 bool newly_bookmarked, |
142 LocationBarDecoration* decoration); | |
137 | 143 |
138 // Shows a views zoom bubble at the |anchor_point|. This occurs when the zoom | 144 // Shows a views zoom bubble at the |anchor_point|. This occurs when the zoom |
139 // icon is clicked or when a shortcut key is pressed or whenever |web_contents| | 145 // icon is clicked or when a shortcut key is pressed or whenever |web_contents| |
140 // zoom factor changes. |user_action| is used to determine if the bubble will | 146 // zoom factor changes. |user_action| is used to determine if the bubble will |
141 // auto-close. | 147 // auto-close. |
142 void ShowZoomBubbleViewsAtPoint(content::WebContents* web_contents, | 148 void ShowZoomBubbleViewsAtPoint(content::WebContents* web_contents, |
143 const gfx::Point& anchor_point, | 149 const gfx::Point& anchor_point, |
144 bool user_action); | 150 bool user_action); |
145 | 151 |
146 // Closes a views zoom bubble if currently shown. | 152 // Closes a views zoom bubble if currently shown. |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
192 | 198 |
193 #if defined(OS_MACOSX) | 199 #if defined(OS_MACOSX) |
194 | 200 |
195 // This is a class so that it can be friended from ContentSettingBubbleContents, | 201 // This is a class so that it can be friended from ContentSettingBubbleContents, |
196 // which allows it to call SetAnchorRect(). | 202 // which allows it to call SetAnchorRect(). |
197 class ContentSettingBubbleViewsBridge { | 203 class ContentSettingBubbleViewsBridge { |
198 public: | 204 public: |
199 static void Show(gfx::NativeView parent_view, | 205 static void Show(gfx::NativeView parent_view, |
200 ContentSettingBubbleModel* model, | 206 ContentSettingBubbleModel* model, |
201 content::WebContents* web_contents, | 207 content::WebContents* web_contents, |
202 const gfx::Point& anchor); | 208 const gfx::Point& anchor, |
209 LocationBarDecoration* decoration); | |
210 | |
203 private: | 211 private: |
204 DISALLOW_IMPLICIT_CONSTRUCTORS(ContentSettingBubbleViewsBridge); | 212 DISALLOW_IMPLICIT_CONSTRUCTORS(ContentSettingBubbleViewsBridge); |
205 }; | 213 }; |
206 | 214 |
207 #endif // OS_MACOSX | 215 #endif // OS_MACOSX |
208 | 216 |
209 #endif // TOOLKIT_VIEWS | 217 #endif // TOOLKIT_VIEWS |
210 | 218 |
211 // Values used in the Dialog.Creation UMA metric. Each value represents a | 219 // Values used in the Dialog.Creation UMA metric. Each value represents a |
212 // different type of dialog box. | 220 // different type of dialog box. |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
279 using BubbleShowPtr = | 287 using BubbleShowPtr = |
280 void (*)(content::WebContents*, | 288 void (*)(content::WebContents*, |
281 const std::vector<arc::ArcNavigationThrottle::AppInfo>&, | 289 const std::vector<arc::ArcNavigationThrottle::AppInfo>&, |
282 const IntentPickerResponse&); | 290 const IntentPickerResponse&); |
283 | 291 |
284 BubbleShowPtr ShowIntentPickerBubble(); | 292 BubbleShowPtr ShowIntentPickerBubble(); |
285 | 293 |
286 #endif // OS_CHROMEOS | 294 #endif // OS_CHROMEOS |
287 | 295 |
288 #endif // CHROME_BROWSER_UI_BROWSER_DIALOGS_H_ | 296 #endif // CHROME_BROWSER_UI_BROWSER_DIALOGS_H_ |
OLD | NEW |