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

Side by Side Diff: components/infobars/core/infobar_delegate.h

Issue 2123863004: ScreenCapture for Android phase1, part II (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add a new infobarDelegate for screen capture Created 4 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 COMPONENTS_INFOBARS_CORE_INFOBAR_DELEGATE_H_ 5 #ifndef COMPONENTS_INFOBARS_CORE_INFOBAR_DELEGATE_H_
6 #define COMPONENTS_INFOBARS_CORE_INFOBAR_DELEGATE_H_ 6 #define COMPONENTS_INFOBARS_CORE_INFOBAR_DELEGATE_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/strings/string16.h" 9 #include "base/strings/string16.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
11 #include "ui/base/window_open_disposition.h" 11 #include "ui/base/window_open_disposition.h"
12 12
13 class ConfirmInfoBarDelegate; 13 class ConfirmInfoBarDelegate;
14 class HungRendererInfoBarDelegate; 14 class HungRendererInfoBarDelegate;
15 class InsecureContentInfoBarDelegate; 15 class InsecureContentInfoBarDelegate;
16 class NativeAppInfoBarDelegate; 16 class NativeAppInfoBarDelegate;
17 class PermissionInfoBarDelegate; 17 class PermissionInfoBarDelegate;
18 class PopupBlockedInfoBarDelegate; 18 class PopupBlockedInfoBarDelegate;
19 class RegisterProtocolHandlerInfoBarDelegate; 19 class RegisterProtocolHandlerInfoBarDelegate;
20 class ScreenCaptureInfoBarDelegate; 20 class ScreenCaptureInfoBarDelegate;
21 class ThemeInstalledInfoBarDelegate; 21 class ThemeInstalledInfoBarDelegate;
22 class ThreeDAPIInfoBarDelegate; 22 class ThreeDAPIInfoBarDelegate;
23 23
24 #if defined(OS_ANDROID) 24 #if defined(OS_ANDROID)
25 class MediaStreamInfoBarDelegateAndroid; 25 class MediaStreamInfoBarDelegateAndroid;
26 class MediaThrottleInfoBarDelegate; 26 class MediaThrottleInfoBarDelegate;
27 class ScreenCaptureInfoBarDelegateAndroid;
27 #endif 28 #endif
28 29
29 namespace translate { 30 namespace translate {
30 class TranslateInfoBarDelegate; 31 class TranslateInfoBarDelegate;
31 } 32 }
32 33
33 namespace gfx { 34 namespace gfx {
34 class Image; 35 class Image;
35 enum class VectorIconId; 36 enum class VectorIconId;
36 } 37 }
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 SYNC_ERROR_INFOBAR_DELEGATE = 58, 129 SYNC_ERROR_INFOBAR_DELEGATE = 58,
129 UPGRADE_INFOBAR_DELEGATE_IOS = 59, 130 UPGRADE_INFOBAR_DELEGATE_IOS = 59,
130 CHROME_WINDOW_ERROR = 60, 131 CHROME_WINDOW_ERROR = 60,
131 CONFIRM_DANGEROUS_DOWNLOAD = 61, 132 CONFIRM_DANGEROUS_DOWNLOAD = 61,
132 // Removed: DESKTOP_SEARCH_REDIRECTION_INFOBAR_DELEGATE = 62, 133 // Removed: DESKTOP_SEARCH_REDIRECTION_INFOBAR_DELEGATE = 62,
133 UPDATE_PASSWORD_INFOBAR_DELEGATE = 63, 134 UPDATE_PASSWORD_INFOBAR_DELEGATE = 63,
134 DATA_REDUCTION_PROMO_INFOBAR_DELEGATE_ANDROID = 64, 135 DATA_REDUCTION_PROMO_INFOBAR_DELEGATE_ANDROID = 64,
135 AUTOFILL_CREDIT_CARD_FILLING_INFOBAR_DELEGATE_ANDROID = 65, 136 AUTOFILL_CREDIT_CARD_FILLING_INFOBAR_DELEGATE_ANDROID = 65,
136 SUBRESOURCE_FILTER_INFOBAR_DELEGATE_ANDROID = 66, 137 SUBRESOURCE_FILTER_INFOBAR_DELEGATE_ANDROID = 66,
137 INSTANT_APPS_INFOBAR_DELEGATE_ANDROID = 67, 138 INSTANT_APPS_INFOBAR_DELEGATE_ANDROID = 67,
139 SCREEN_CAPTURE_INFOBAR_DELEGATE_ANDROID = 68,
138 }; 140 };
139 141
140 // Describes navigation events, used to decide whether infobars should be 142 // Describes navigation events, used to decide whether infobars should be
141 // dismissed. 143 // dismissed.
142 struct NavigationDetails { 144 struct NavigationDetails {
143 // Unique identifier for the entry. 145 // Unique identifier for the entry.
144 int entry_id; 146 int entry_id;
145 // True if it is a navigation to a different page (as opposed to in-page). 147 // True if it is a navigation to a different page (as opposed to in-page).
146 bool is_navigation_to_different_page; 148 bool is_navigation_to_different_page;
147 // True if the entry replaced the existing one. 149 // True if the entry replaced the existing one.
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 virtual RegisterProtocolHandlerInfoBarDelegate* 214 virtual RegisterProtocolHandlerInfoBarDelegate*
213 AsRegisterProtocolHandlerInfoBarDelegate(); 215 AsRegisterProtocolHandlerInfoBarDelegate();
214 virtual ScreenCaptureInfoBarDelegate* AsScreenCaptureInfoBarDelegate(); 216 virtual ScreenCaptureInfoBarDelegate* AsScreenCaptureInfoBarDelegate();
215 virtual ThemeInstalledInfoBarDelegate* AsThemePreviewInfobarDelegate(); 217 virtual ThemeInstalledInfoBarDelegate* AsThemePreviewInfobarDelegate();
216 virtual ThreeDAPIInfoBarDelegate* AsThreeDAPIInfoBarDelegate(); 218 virtual ThreeDAPIInfoBarDelegate* AsThreeDAPIInfoBarDelegate();
217 virtual translate::TranslateInfoBarDelegate* AsTranslateInfoBarDelegate(); 219 virtual translate::TranslateInfoBarDelegate* AsTranslateInfoBarDelegate();
218 #if defined(OS_ANDROID) 220 #if defined(OS_ANDROID)
219 virtual MediaStreamInfoBarDelegateAndroid* 221 virtual MediaStreamInfoBarDelegateAndroid*
220 AsMediaStreamInfoBarDelegateAndroid(); 222 AsMediaStreamInfoBarDelegateAndroid();
221 virtual MediaThrottleInfoBarDelegate* AsMediaThrottleInfoBarDelegate(); 223 virtual MediaThrottleInfoBarDelegate* AsMediaThrottleInfoBarDelegate();
224 virtual ScreenCaptureInfoBarDelegateAndroid*
225 AsScreenCaptureInfoBarDelegateAndroid();
222 #endif 226 #endif
223 227
224 void set_infobar(InfoBar* infobar) { infobar_ = infobar; } 228 void set_infobar(InfoBar* infobar) { infobar_ = infobar; }
225 void set_nav_entry_id(int nav_entry_id) { nav_entry_id_ = nav_entry_id; } 229 void set_nav_entry_id(int nav_entry_id) { nav_entry_id_ = nav_entry_id; }
226 230
227 protected: 231 protected:
228 InfoBarDelegate(); 232 InfoBarDelegate();
229 233
230 InfoBar* infobar() { return infobar_; } 234 InfoBar* infobar() { return infobar_; }
231 235
232 private: 236 private:
233 // The InfoBar associated with us. 237 // The InfoBar associated with us.
234 InfoBar* infobar_; 238 InfoBar* infobar_;
235 239
236 // The ID of the active navigation entry at the time we became owned. 240 // The ID of the active navigation entry at the time we became owned.
237 int nav_entry_id_; 241 int nav_entry_id_;
238 242
239 DISALLOW_COPY_AND_ASSIGN(InfoBarDelegate); 243 DISALLOW_COPY_AND_ASSIGN(InfoBarDelegate);
240 }; 244 };
241 245
242 } // namespace infobars 246 } // namespace infobars
243 247
244 #endif // COMPONENTS_INFOBARS_CORE_INFOBAR_DELEGATE_H_ 248 #endif // COMPONENTS_INFOBARS_CORE_INFOBAR_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698