OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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_WINDOW_H_ | 5 #ifndef CHROME_BROWSER_UI_BROWSER_WINDOW_H_ |
6 #define CHROME_BROWSER_UI_BROWSER_WINDOW_H_ | 6 #define CHROME_BROWSER_UI_BROWSER_WINDOW_H_ |
7 | 7 |
8 #include "base/callback_forward.h" | 8 #include "base/callback_forward.h" |
9 #include "chrome/browser/lifetime/browser_close_manager.h" | 9 #include "chrome/browser/lifetime/browser_close_manager.h" |
10 #include "chrome/browser/signin/chrome_signin_helper.h" | 10 #include "chrome/browser/signin/chrome_signin_helper.h" |
11 #include "chrome/browser/ssl/security_state_model.h" | 11 #include "chrome/browser/ssl/security_state_model.h" |
12 #include "chrome/browser/translate/chrome_translate_client.h" | 12 #include "chrome/browser/translate/chrome_translate_client.h" |
13 #include "chrome/browser/ui/bookmarks/bookmark_bar.h" | 13 #include "chrome/browser/ui/bookmarks/bookmark_bar.h" |
14 #include "chrome/browser/ui/browser.h" | 14 #include "chrome/browser/ui/browser.h" |
15 #include "chrome/browser/ui/exclusive_access/exclusive_access_bubble_type.h" | 15 #include "chrome/browser/ui/exclusive_access/exclusive_access_bubble_type.h" |
16 #include "chrome/browser/ui/host_desktop.h" | 16 #include "chrome/browser/ui/host_desktop.h" |
17 #include "chrome/browser/ui/sync/one_click_signin_sync_starter.h" | 17 #include "chrome/browser/ui/sync/one_click_signin_sync_starter.h" |
18 #include "components/content_settings/core/common/content_settings_types.h" | 18 #include "components/content_settings/core/common/content_settings_types.h" |
19 #include "components/signin/core/browser/signin_header_helper.h" | 19 #include "components/signin/core/browser/signin_header_helper.h" |
| 20 #include "components/signin/core/browser/signin_metrics.h" |
20 #include "components/translate/core/common/translate_errors.h" | 21 #include "components/translate/core/common/translate_errors.h" |
21 #include "ui/base/base_window.h" | 22 #include "ui/base/base_window.h" |
22 #include "ui/base/window_open_disposition.h" | 23 #include "ui/base/window_open_disposition.h" |
23 #include "ui/gfx/native_widget_types.h" | 24 #include "ui/gfx/native_widget_types.h" |
24 | 25 |
25 class Browser; | 26 class Browser; |
26 class DownloadShelf; | 27 class DownloadShelf; |
27 class ExclusiveAccessContext; | 28 class ExclusiveAccessContext; |
28 class FindBar; | 29 class FindBar; |
29 class GlobalErrorBubbleViewBase; | 30 class GlobalErrorBubbleViewBase; |
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
367 static BrowserWindow* CreateBrowserWindow(Browser* browser); | 368 static BrowserWindow* CreateBrowserWindow(Browser* browser); |
368 | 369 |
369 // Returns a HostDesktopType that is compatible with the current Chrome window | 370 // Returns a HostDesktopType that is compatible with the current Chrome window |
370 // configuration. On Windows with Ash, this is always HOST_DESKTOP_TYPE_ASH | 371 // configuration. On Windows with Ash, this is always HOST_DESKTOP_TYPE_ASH |
371 // while Chrome is running in Metro mode. Otherwise returns |desktop_type|. | 372 // while Chrome is running in Metro mode. Otherwise returns |desktop_type|. |
372 static chrome::HostDesktopType AdjustHostDesktopType( | 373 static chrome::HostDesktopType AdjustHostDesktopType( |
373 chrome::HostDesktopType desktop_type); | 374 chrome::HostDesktopType desktop_type); |
374 | 375 |
375 // Shows the avatar bubble on the window frame off of the avatar button with | 376 // Shows the avatar bubble on the window frame off of the avatar button with |
376 // the given mode. The Service Type specified by GAIA is provided as well. | 377 // the given mode. The Service Type specified by GAIA is provided as well. |
| 378 // |access_point| specifies the access point used to open the Gaia sign in |
| 379 // page. |
377 enum AvatarBubbleMode { | 380 enum AvatarBubbleMode { |
378 AVATAR_BUBBLE_MODE_DEFAULT, | 381 AVATAR_BUBBLE_MODE_DEFAULT, |
379 AVATAR_BUBBLE_MODE_ACCOUNT_MANAGEMENT, | 382 AVATAR_BUBBLE_MODE_ACCOUNT_MANAGEMENT, |
380 AVATAR_BUBBLE_MODE_SIGNIN, | 383 AVATAR_BUBBLE_MODE_SIGNIN, |
381 AVATAR_BUBBLE_MODE_ADD_ACCOUNT, | 384 AVATAR_BUBBLE_MODE_ADD_ACCOUNT, |
382 AVATAR_BUBBLE_MODE_REAUTH, | 385 AVATAR_BUBBLE_MODE_REAUTH, |
383 AVATAR_BUBBLE_MODE_CONFIRM_SIGNIN, | 386 AVATAR_BUBBLE_MODE_CONFIRM_SIGNIN, |
384 AVATAR_BUBBLE_MODE_SHOW_ERROR, | 387 AVATAR_BUBBLE_MODE_SHOW_ERROR, |
385 AVATAR_BUBBLE_MODE_FAST_USER_SWITCH, | 388 AVATAR_BUBBLE_MODE_FAST_USER_SWITCH, |
386 }; | 389 }; |
387 virtual void ShowAvatarBubbleFromAvatarButton(AvatarBubbleMode mode, | 390 virtual void ShowAvatarBubbleFromAvatarButton( |
388 const signin::ManageAccountsParams& manage_accounts_params) = 0; | 391 AvatarBubbleMode mode, |
| 392 const signin::ManageAccountsParams& manage_accounts_params, |
| 393 signin_metrics::AccessPoint access_point) = 0; |
389 | 394 |
390 // Returns the height inset for RenderView when detached bookmark bar is | 395 // Returns the height inset for RenderView when detached bookmark bar is |
391 // shown. Invoked when a new RenderHostView is created for a non-NTP | 396 // shown. Invoked when a new RenderHostView is created for a non-NTP |
392 // navigation entry and the bookmark bar is detached. | 397 // navigation entry and the bookmark bar is detached. |
393 virtual int GetRenderViewHeightInsetWithDetachedBookmarkBar() = 0; | 398 virtual int GetRenderViewHeightInsetWithDetachedBookmarkBar() = 0; |
394 | 399 |
395 // Executes |command| registered by |extension|. | 400 // Executes |command| registered by |extension|. |
396 virtual void ExecuteExtensionCommand(const extensions::Extension* extension, | 401 virtual void ExecuteExtensionCommand(const extensions::Extension* extension, |
397 const extensions::Command& command) = 0; | 402 const extensions::Command& command) = 0; |
398 | 403 |
399 // Returns object implementing ExclusiveAccessContext interface. | 404 // Returns object implementing ExclusiveAccessContext interface. |
400 virtual ExclusiveAccessContext* GetExclusiveAccessContext() = 0; | 405 virtual ExclusiveAccessContext* GetExclusiveAccessContext() = 0; |
401 | 406 |
402 protected: | 407 protected: |
403 friend class BrowserCloseManager; | 408 friend class BrowserCloseManager; |
404 friend class BrowserView; | 409 friend class BrowserView; |
405 virtual void DestroyBrowser() = 0; | 410 virtual void DestroyBrowser() = 0; |
406 }; | 411 }; |
407 | 412 |
408 #endif // CHROME_BROWSER_UI_BROWSER_WINDOW_H_ | 413 #endif // CHROME_BROWSER_UI_BROWSER_WINDOW_H_ |
OLD | NEW |