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

Side by Side Diff: chrome/browser/ui/views/frame/avatar_button_manager.cc

Issue 2868293002: Rename new_avatar_button.* to avatar_button in preparation for CL 2851543002 (Closed)
Patch Set: Created 3 years, 7 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
« no previous file with comments | « chrome/browser/ui/BUILD.gn ('k') | chrome/browser/ui/views/profiles/avatar_button.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #include "chrome/browser/ui/views/frame/avatar_button_manager.h" 5 #include "chrome/browser/ui/views/frame/avatar_button_manager.h"
6 6
7 #include "chrome/browser/browser_process.h" 7 #include "chrome/browser/browser_process.h"
8 #include "chrome/browser/profiles/profile_manager.h" 8 #include "chrome/browser/profiles/profile_manager.h"
9 #include "chrome/browser/ui/view_ids.h" 9 #include "chrome/browser/ui/view_ids.h"
10 #include "chrome/browser/ui/views/frame/browser_frame.h" 10 #include "chrome/browser/ui/views/frame/browser_frame.h"
11 #include "chrome/browser/ui/views/frame/browser_view.h" 11 #include "chrome/browser/ui/views/frame/browser_view.h"
12 #include "chrome/browser/ui/views/profiles/new_avatar_button.h" 12 #include "chrome/browser/ui/views/profiles/avatar_button.h"
13 13
14 AvatarButtonManager::AvatarButtonManager(BrowserNonClientFrameView* frame_view) 14 AvatarButtonManager::AvatarButtonManager(BrowserNonClientFrameView* frame_view)
15 : frame_view_(frame_view), view_(nullptr) {} 15 : frame_view_(frame_view), view_(nullptr) {}
16 16
17 void AvatarButtonManager::Update(AvatarButtonStyle style) { 17 void AvatarButtonManager::Update(AvatarButtonStyle style) {
18 BrowserView* browser_view = frame_view_->browser_view(); 18 BrowserView* browser_view = frame_view_->browser_view();
19 BrowserFrame* frame = frame_view_->frame(); 19 BrowserFrame* frame = frame_view_->frame();
20 Profile* profile = browser_view->browser()->profile(); 20 Profile* profile = browser_view->browser()->profile();
21 21
22 // This should never be called in incognito mode. 22 // This should never be called in incognito mode.
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 BrowserWindow::AVATAR_BUBBLE_MODE_DEFAULT; 60 BrowserWindow::AVATAR_BUBBLE_MODE_DEFAULT;
61 if ((event.IsMouseEvent() && 61 if ((event.IsMouseEvent() &&
62 static_cast<const ui::MouseEvent&>(event).IsRightMouseButton()) || 62 static_cast<const ui::MouseEvent&>(event).IsRightMouseButton()) ||
63 (event.type() == ui::ET_GESTURE_LONG_PRESS)) { 63 (event.type() == ui::ET_GESTURE_LONG_PRESS)) {
64 return; 64 return;
65 } 65 }
66 frame_view_->browser_view()->ShowAvatarBubbleFromAvatarButton( 66 frame_view_->browser_view()->ShowAvatarBubbleFromAvatarButton(
67 mode, signin::ManageAccountsParams(), 67 mode, signin::ManageAccountsParams(),
68 signin_metrics::AccessPoint::ACCESS_POINT_AVATAR_BUBBLE_SIGN_IN, false); 68 signin_metrics::AccessPoint::ACCESS_POINT_AVATAR_BUBBLE_SIGN_IN, false);
69 } 69 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/BUILD.gn ('k') | chrome/browser/ui/views/profiles/avatar_button.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698