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

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: document signin.signinreason histogram 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"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 web_modal { 60 namespace web_modal {
61 class WebContentsModalDialogHost; 61 class WebContentsModalDialogHost;
62 } 62 }
63 63
64 namespace signin_metrics {
Bernhard Bauer 2015/12/07 12:14:54 Keep the namespaces ordered alphabetically. Also,
gogerald1 2015/12/07 16:45:30 Done. Specify underlying type to make explicit con
Bernhard Bauer 2015/12/07 16:49:27 Well, do we need to repeat this everywhere this en
65 enum class AccessPoint : int;
66 }
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 //
70 // NOTE: All getters may return NULL. 74 // NOTE: All getters may return NULL.
71 // 75 //
72 class BrowserWindow : public ui::BaseWindow { 76 class BrowserWindow : public ui::BaseWindow {
73 public: 77 public:
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 static BrowserWindow* CreateBrowserWindow(Browser* browser); 371 static BrowserWindow* CreateBrowserWindow(Browser* browser);
368 372
369 // Returns a HostDesktopType that is compatible with the current Chrome window 373 // Returns a HostDesktopType that is compatible with the current Chrome window
370 // configuration. On Windows with Ash, this is always HOST_DESKTOP_TYPE_ASH 374 // configuration. On Windows with Ash, this is always HOST_DESKTOP_TYPE_ASH
371 // while Chrome is running in Metro mode. Otherwise returns |desktop_type|. 375 // while Chrome is running in Metro mode. Otherwise returns |desktop_type|.
372 static chrome::HostDesktopType AdjustHostDesktopType( 376 static chrome::HostDesktopType AdjustHostDesktopType(
373 chrome::HostDesktopType desktop_type); 377 chrome::HostDesktopType desktop_type);
374 378
375 // Shows the avatar bubble on the window frame off of the avatar button with 379 // 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. 380 // the given mode. The Service Type specified by GAIA is provided as well.
381 // |access_point| indicates the access point used to open the Gaia sign in
382 // page.
377 enum AvatarBubbleMode { 383 enum AvatarBubbleMode {
378 AVATAR_BUBBLE_MODE_DEFAULT, 384 AVATAR_BUBBLE_MODE_DEFAULT,
379 AVATAR_BUBBLE_MODE_ACCOUNT_MANAGEMENT, 385 AVATAR_BUBBLE_MODE_ACCOUNT_MANAGEMENT,
380 AVATAR_BUBBLE_MODE_SIGNIN, 386 AVATAR_BUBBLE_MODE_SIGNIN,
381 AVATAR_BUBBLE_MODE_ADD_ACCOUNT, 387 AVATAR_BUBBLE_MODE_ADD_ACCOUNT,
382 AVATAR_BUBBLE_MODE_REAUTH, 388 AVATAR_BUBBLE_MODE_REAUTH,
383 AVATAR_BUBBLE_MODE_CONFIRM_SIGNIN, 389 AVATAR_BUBBLE_MODE_CONFIRM_SIGNIN,
384 AVATAR_BUBBLE_MODE_SHOW_ERROR, 390 AVATAR_BUBBLE_MODE_SHOW_ERROR,
385 AVATAR_BUBBLE_MODE_FAST_USER_SWITCH, 391 AVATAR_BUBBLE_MODE_FAST_USER_SWITCH,
386 }; 392 };
387 virtual void ShowAvatarBubbleFromAvatarButton(AvatarBubbleMode mode, 393 virtual void ShowAvatarBubbleFromAvatarButton(
388 const signin::ManageAccountsParams& manage_accounts_params) = 0; 394 AvatarBubbleMode mode,
395 const signin::ManageAccountsParams& manage_accounts_params,
396 signin_metrics::AccessPoint access_point) = 0;
389 397
390 // Shows the signin flow for |mode| in a tab-modal dialog. 398 // Shows the signin flow for |mode| in a tab-modal dialog.
391 virtual void ShowModalSigninWindow(AvatarBubbleMode mode) = 0; 399 // |access_point| indicates the access point used to open the Gaia sign in
400 // page.
401 virtual void ShowModalSigninWindow(
402 AvatarBubbleMode mode,
403 signin_metrics::AccessPoint access_point) = 0;
392 404
393 // Closes the tab-modal signin flow opened with ShowModalSigninWindow, if it's 405 // Closes the tab-modal signin flow opened with ShowModalSigninWindow, if it's
394 // open. Does nothing otherwise. 406 // open. Does nothing otherwise.
395 virtual void CloseModalSigninWindow() = 0; 407 virtual void CloseModalSigninWindow() = 0;
396 408
397 // Returns the height inset for RenderView when detached bookmark bar is 409 // Returns the height inset for RenderView when detached bookmark bar is
398 // shown. Invoked when a new RenderHostView is created for a non-NTP 410 // shown. Invoked when a new RenderHostView is created for a non-NTP
399 // navigation entry and the bookmark bar is detached. 411 // navigation entry and the bookmark bar is detached.
400 virtual int GetRenderViewHeightInsetWithDetachedBookmarkBar() = 0; 412 virtual int GetRenderViewHeightInsetWithDetachedBookmarkBar() = 0;
401 413
402 // Executes |command| registered by |extension|. 414 // Executes |command| registered by |extension|.
403 virtual void ExecuteExtensionCommand(const extensions::Extension* extension, 415 virtual void ExecuteExtensionCommand(const extensions::Extension* extension,
404 const extensions::Command& command) = 0; 416 const extensions::Command& command) = 0;
405 417
406 // Returns object implementing ExclusiveAccessContext interface. 418 // Returns object implementing ExclusiveAccessContext interface.
407 virtual ExclusiveAccessContext* GetExclusiveAccessContext() = 0; 419 virtual ExclusiveAccessContext* GetExclusiveAccessContext() = 0;
408 420
409 protected: 421 protected:
410 friend class BrowserCloseManager; 422 friend class BrowserCloseManager;
411 friend class BrowserView; 423 friend class BrowserView;
412 virtual void DestroyBrowser() = 0; 424 virtual void DestroyBrowser() = 0;
413 }; 425 };
414 426
415 #endif // CHROME_BROWSER_UI_BROWSER_WINDOW_H_ 427 #endif // CHROME_BROWSER_UI_BROWSER_WINDOW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698