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

Side by Side Diff: chrome/browser/ui/views/profiles/avatar_menu_button.cc

Issue 674273002: Cleanup: Remove unneeded chrome/common/pref_names.h includes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 1 month 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/profiles/avatar_menu_button.h" 5 #include "chrome/browser/ui/views/profiles/avatar_menu_button.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/prefs/pref_service.h" 8 #include "base/prefs/pref_service.h"
9 #include "chrome/browser/browser_process.h" 9 #include "chrome/browser/browser_process.h"
10 #include "chrome/browser/chrome_notification_types.h" 10 #include "chrome/browser/chrome_notification_types.h"
11 #include "chrome/browser/profiles/avatar_menu.h" 11 #include "chrome/browser/profiles/avatar_menu.h"
12 #include "chrome/browser/profiles/profile.h" 12 #include "chrome/browser/profiles/profile.h"
13 #include "chrome/browser/profiles/profile_avatar_icon_util.h" 13 #include "chrome/browser/profiles/profile_avatar_icon_util.h"
14 #include "chrome/browser/profiles/profile_info_cache.h" 14 #include "chrome/browser/profiles/profile_info_cache.h"
15 #include "chrome/browser/profiles/profile_manager.h" 15 #include "chrome/browser/profiles/profile_manager.h"
16 #include "chrome/browser/profiles/profile_metrics.h" 16 #include "chrome/browser/profiles/profile_metrics.h"
17 #include "chrome/browser/ui/browser.h" 17 #include "chrome/browser/ui/browser.h"
18 #include "chrome/browser/ui/browser_commands.h" 18 #include "chrome/browser/ui/browser_commands.h"
19 #include "chrome/browser/ui/views/frame/browser_view.h" 19 #include "chrome/browser/ui/views/frame/browser_view.h"
20 #include "chrome/browser/ui/views/profiles/avatar_menu_bubble_view.h" 20 #include "chrome/browser/ui/views/profiles/avatar_menu_bubble_view.h"
21 #include "chrome/browser/ui/views/profiles/profile_chooser_view.h" 21 #include "chrome/browser/ui/views/profiles/profile_chooser_view.h"
22 #include "chrome/common/pref_names.h"
23 #include "components/signin/core/common/profile_management_switches.h" 22 #include "components/signin/core/common/profile_management_switches.h"
24 #include "content/public/browser/notification_service.h" 23 #include "content/public/browser/notification_service.h"
25 #include "grit/theme_resources.h" 24 #include "grit/theme_resources.h"
26 #include "ui/base/resource/resource_bundle.h" 25 #include "ui/base/resource/resource_bundle.h"
27 #include "ui/gfx/canvas.h" 26 #include "ui/gfx/canvas.h"
28 #include "ui/views/view_targeter.h" 27 #include "ui/views/view_targeter.h"
29 #include "ui/views/widget/widget.h" 28 #include "ui/views/widget/widget.h"
30 29
31 static inline int Round(double x) { 30 static inline int Round(double x) {
32 return static_cast<int>(x + 0.5); 31 return static_cast<int>(x + 0.5);
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 return !disabled_ && 136 return !disabled_ &&
138 views::ViewTargeterDelegate::DoesIntersectRect(target, rect); 137 views::ViewTargeterDelegate::DoesIntersectRect(target, rect);
139 } 138 }
140 139
141 // views::MenuButtonListener implementation 140 // views::MenuButtonListener implementation
142 void AvatarMenuButton::OnMenuButtonClicked(views::View* source, 141 void AvatarMenuButton::OnMenuButtonClicked(views::View* source,
143 const gfx::Point& point) { 142 const gfx::Point& point) {
144 if (!disabled_) 143 if (!disabled_)
145 chrome::ShowAvatarMenu(browser_); 144 chrome::ShowAvatarMenu(browser_);
146 } 145 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698