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

Side by Side Diff: chrome/browser/ui/browser_window.h

Issue 1473543002: Implement newly designed sign-in related histograms for desktop platorms. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add comments Created 5 years 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 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
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| indicates 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 // Shows the signin flow for |mode| in a tab-modal dialog. 395 // Shows the signin flow for |mode| in a tab-modal dialog.
391 virtual void ShowModalSigninWindow(AvatarBubbleMode mode) = 0; 396 // |access_point| indicates the access point used to open the Gaia sign in
397 // page.
398 virtual void ShowModalSigninWindow(
399 AvatarBubbleMode mode,
400 signin_metrics::AccessPoint access_point) = 0;
392 401
393 // Closes the tab-modal signin flow opened with ShowModalSigninWindow, if it's 402 // Closes the tab-modal signin flow opened with ShowModalSigninWindow, if it's
394 // open. Does nothing otherwise. 403 // open. Does nothing otherwise.
395 virtual void CloseModalSigninWindow() = 0; 404 virtual void CloseModalSigninWindow() = 0;
396 405
397 // Returns the height inset for RenderView when detached bookmark bar is 406 // Returns the height inset for RenderView when detached bookmark bar is
398 // shown. Invoked when a new RenderHostView is created for a non-NTP 407 // shown. Invoked when a new RenderHostView is created for a non-NTP
399 // navigation entry and the bookmark bar is detached. 408 // navigation entry and the bookmark bar is detached.
400 virtual int GetRenderViewHeightInsetWithDetachedBookmarkBar() = 0; 409 virtual int GetRenderViewHeightInsetWithDetachedBookmarkBar() = 0;
401 410
402 // Executes |command| registered by |extension|. 411 // Executes |command| registered by |extension|.
403 virtual void ExecuteExtensionCommand(const extensions::Extension* extension, 412 virtual void ExecuteExtensionCommand(const extensions::Extension* extension,
404 const extensions::Command& command) = 0; 413 const extensions::Command& command) = 0;
405 414
406 // Returns object implementing ExclusiveAccessContext interface. 415 // Returns object implementing ExclusiveAccessContext interface.
407 virtual ExclusiveAccessContext* GetExclusiveAccessContext() = 0; 416 virtual ExclusiveAccessContext* GetExclusiveAccessContext() = 0;
408 417
409 protected: 418 protected:
410 friend class BrowserCloseManager; 419 friend class BrowserCloseManager;
411 friend class BrowserView; 420 friend class BrowserView;
412 virtual void DestroyBrowser() = 0; 421 virtual void DestroyBrowser() = 0;
413 }; 422 };
414 423
415 #endif // CHROME_BROWSER_UI_BROWSER_WINDOW_H_ 424 #endif // CHROME_BROWSER_UI_BROWSER_WINDOW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698