| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 #include "chrome/browser/ui/views/frame/glass_browser_frame_view.h" | 5 #include "chrome/browser/ui/views/frame/glass_browser_frame_view.h" |
| 6 | 6 |
| 7 #include "base/prefs/pref_service.h" | 7 #include "base/prefs/pref_service.h" |
| 8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
| 9 #include "base/win/windows_version.h" | 9 #include "base/win/windows_version.h" |
| 10 #include "chrome/app/chrome_command_ids.h" | 10 #include "chrome/app/chrome_command_ids.h" |
| (...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 268 const ui::Event& event) { | 268 const ui::Event& event) { |
| 269 if (sender == new_avatar_button()) { | 269 if (sender == new_avatar_button()) { |
| 270 BrowserWindow::AvatarBubbleMode mode = | 270 BrowserWindow::AvatarBubbleMode mode = |
| 271 BrowserWindow::AVATAR_BUBBLE_MODE_DEFAULT; | 271 BrowserWindow::AVATAR_BUBBLE_MODE_DEFAULT; |
| 272 if ((event.IsMouseEvent() && | 272 if ((event.IsMouseEvent() && |
| 273 static_cast<const ui::MouseEvent&>(event).IsRightMouseButton()) || | 273 static_cast<const ui::MouseEvent&>(event).IsRightMouseButton()) || |
| 274 (event.type() == ui::ET_GESTURE_LONG_PRESS)) { | 274 (event.type() == ui::ET_GESTURE_LONG_PRESS)) { |
| 275 mode = BrowserWindow::AVATAR_BUBBLE_MODE_FAST_USER_SWITCH; | 275 mode = BrowserWindow::AVATAR_BUBBLE_MODE_FAST_USER_SWITCH; |
| 276 } | 276 } |
| 277 browser_view()->ShowAvatarBubbleFromAvatarButton( | 277 browser_view()->ShowAvatarBubbleFromAvatarButton( |
| 278 mode, | 278 mode, signin::ManageAccountsParams(), |
| 279 signin::ManageAccountsParams()); | 279 signin_metrics::AccessPoint::ACCESS_POINT_AVATAR_BUBBLE_SIGN_IN); |
| 280 } | 280 } |
| 281 } | 281 } |
| 282 | 282 |
| 283 // BrowserNonClientFrameView: | 283 // BrowserNonClientFrameView: |
| 284 void GlassBrowserFrameView::UpdateNewAvatarButtonImpl() { | 284 void GlassBrowserFrameView::UpdateNewAvatarButtonImpl() { |
| 285 UpdateNewAvatarButton(this, NewAvatarButton::NATIVE_BUTTON); | 285 UpdateNewAvatarButton(this, NewAvatarButton::NATIVE_BUTTON); |
| 286 } | 286 } |
| 287 | 287 |
| 288 /////////////////////////////////////////////////////////////////////////////// | 288 /////////////////////////////////////////////////////////////////////////////// |
| 289 // GlassBrowserFrameView, private: | 289 // GlassBrowserFrameView, private: |
| (...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 638 static bool initialized = false; | 638 static bool initialized = false; |
| 639 if (!initialized) { | 639 if (!initialized) { |
| 640 for (int i = 0; i < kThrobberIconCount; ++i) { | 640 for (int i = 0; i < kThrobberIconCount; ++i) { |
| 641 throbber_icons_[i] = | 641 throbber_icons_[i] = |
| 642 ui::LoadThemeIconFromResourcesDataDLL(IDI_THROBBER_01 + i); | 642 ui::LoadThemeIconFromResourcesDataDLL(IDI_THROBBER_01 + i); |
| 643 DCHECK(throbber_icons_[i]); | 643 DCHECK(throbber_icons_[i]); |
| 644 } | 644 } |
| 645 initialized = true; | 645 initialized = true; |
| 646 } | 646 } |
| 647 } | 647 } |
| OLD | NEW |