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

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: format 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
« no previous file with comments | « chrome/browser/ui/browser_mac.cc ('k') | chrome/browser/ui/chrome_pages.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 namespace extensions { 50 namespace extensions {
51 class Command; 51 class Command;
52 class Extension; 52 class Extension;
53 } 53 }
54 54
55 namespace gfx { 55 namespace gfx {
56 class Rect; 56 class Rect;
57 class Size; 57 class Size;
58 } 58 }
59 59
60 namespace signin_metrics {
61 enum class AccessPoint;
62 }
63
60 namespace web_modal { 64 namespace web_modal {
61 class WebContentsModalDialogHost; 65 class WebContentsModalDialogHost;
62 } 66 }
63 67
64 //////////////////////////////////////////////////////////////////////////////// 68 ////////////////////////////////////////////////////////////////////////////////
65 // BrowserWindow interface 69 // BrowserWindow interface
66 // An interface implemented by the "view" of the Browser window. 70 // An interface implemented by the "view" of the Browser window.
67 // This interface includes ui::BaseWindow methods as well as Browser window 71 // This interface includes ui::BaseWindow methods as well as Browser window
68 // specific methods. 72 // specific methods.
69 // 73 //
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 static BrowserWindow* CreateBrowserWindow(Browser* browser); 360 static BrowserWindow* CreateBrowserWindow(Browser* browser);
357 361
358 // Returns a HostDesktopType that is compatible with the current Chrome window 362 // Returns a HostDesktopType that is compatible with the current Chrome window
359 // configuration. On Windows with Ash, this is always HOST_DESKTOP_TYPE_ASH 363 // configuration. On Windows with Ash, this is always HOST_DESKTOP_TYPE_ASH
360 // while Chrome is running in Metro mode. Otherwise returns |desktop_type|. 364 // while Chrome is running in Metro mode. Otherwise returns |desktop_type|.
361 static chrome::HostDesktopType AdjustHostDesktopType( 365 static chrome::HostDesktopType AdjustHostDesktopType(
362 chrome::HostDesktopType desktop_type); 366 chrome::HostDesktopType desktop_type);
363 367
364 // Shows the avatar bubble on the window frame off of the avatar button with 368 // Shows the avatar bubble on the window frame off of the avatar button with
365 // the given mode. The Service Type specified by GAIA is provided as well. 369 // the given mode. The Service Type specified by GAIA is provided as well.
370 // |access_point| indicates the access point used to open the Gaia sign in
371 // page.
366 enum AvatarBubbleMode { 372 enum AvatarBubbleMode {
367 AVATAR_BUBBLE_MODE_DEFAULT, 373 AVATAR_BUBBLE_MODE_DEFAULT,
368 AVATAR_BUBBLE_MODE_ACCOUNT_MANAGEMENT, 374 AVATAR_BUBBLE_MODE_ACCOUNT_MANAGEMENT,
369 AVATAR_BUBBLE_MODE_SIGNIN, 375 AVATAR_BUBBLE_MODE_SIGNIN,
370 AVATAR_BUBBLE_MODE_ADD_ACCOUNT, 376 AVATAR_BUBBLE_MODE_ADD_ACCOUNT,
371 AVATAR_BUBBLE_MODE_REAUTH, 377 AVATAR_BUBBLE_MODE_REAUTH,
372 AVATAR_BUBBLE_MODE_CONFIRM_SIGNIN, 378 AVATAR_BUBBLE_MODE_CONFIRM_SIGNIN,
373 AVATAR_BUBBLE_MODE_SHOW_ERROR, 379 AVATAR_BUBBLE_MODE_SHOW_ERROR,
374 AVATAR_BUBBLE_MODE_FAST_USER_SWITCH, 380 AVATAR_BUBBLE_MODE_FAST_USER_SWITCH,
375 }; 381 };
376 virtual void ShowAvatarBubbleFromAvatarButton(AvatarBubbleMode mode, 382 virtual void ShowAvatarBubbleFromAvatarButton(
377 const signin::ManageAccountsParams& manage_accounts_params) = 0; 383 AvatarBubbleMode mode,
384 const signin::ManageAccountsParams& manage_accounts_params,
385 signin_metrics::AccessPoint access_point) = 0;
378 386
379 // Shows the signin flow for |mode| in a tab-modal dialog. 387 // Shows the signin flow for |mode| in a tab-modal dialog.
380 virtual void ShowModalSigninWindow(AvatarBubbleMode mode) = 0; 388 // |access_point| indicates the access point used to open the Gaia sign in
389 // page.
390 virtual void ShowModalSigninWindow(
391 AvatarBubbleMode mode,
392 signin_metrics::AccessPoint access_point) = 0;
381 393
382 // Closes the tab-modal signin flow opened with ShowModalSigninWindow, if it's 394 // Closes the tab-modal signin flow opened with ShowModalSigninWindow, if it's
383 // open. Does nothing otherwise. 395 // open. Does nothing otherwise.
384 virtual void CloseModalSigninWindow() = 0; 396 virtual void CloseModalSigninWindow() = 0;
385 397
386 // Returns the height inset for RenderView when detached bookmark bar is 398 // Returns the height inset for RenderView when detached bookmark bar is
387 // shown. Invoked when a new RenderHostView is created for a non-NTP 399 // shown. Invoked when a new RenderHostView is created for a non-NTP
388 // navigation entry and the bookmark bar is detached. 400 // navigation entry and the bookmark bar is detached.
389 virtual int GetRenderViewHeightInsetWithDetachedBookmarkBar() = 0; 401 virtual int GetRenderViewHeightInsetWithDetachedBookmarkBar() = 0;
390 402
391 // Executes |command| registered by |extension|. 403 // Executes |command| registered by |extension|.
392 virtual void ExecuteExtensionCommand(const extensions::Extension* extension, 404 virtual void ExecuteExtensionCommand(const extensions::Extension* extension,
393 const extensions::Command& command) = 0; 405 const extensions::Command& command) = 0;
394 406
395 // Returns object implementing ExclusiveAccessContext interface. 407 // Returns object implementing ExclusiveAccessContext interface.
396 virtual ExclusiveAccessContext* GetExclusiveAccessContext() = 0; 408 virtual ExclusiveAccessContext* GetExclusiveAccessContext() = 0;
397 409
398 protected: 410 protected:
399 friend class BrowserCloseManager; 411 friend class BrowserCloseManager;
400 friend class BrowserView; 412 friend class BrowserView;
401 virtual void DestroyBrowser() = 0; 413 virtual void DestroyBrowser() = 0;
402 }; 414 };
403 415
404 #endif // CHROME_BROWSER_UI_BROWSER_WINDOW_H_ 416 #endif // CHROME_BROWSER_UI_BROWSER_WINDOW_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_mac.cc ('k') | chrome/browser/ui/chrome_pages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698