| 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 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 285 | 285 |
| 286 /////////////////////////////////////////////////////////////////////////////// | 286 /////////////////////////////////////////////////////////////////////////////// |
| 287 // GlassBrowserFrameView, protected: | 287 // GlassBrowserFrameView, protected: |
| 288 | 288 |
| 289 // views::ButtonListener: | 289 // views::ButtonListener: |
| 290 void GlassBrowserFrameView::ButtonPressed(views::Button* sender, | 290 void GlassBrowserFrameView::ButtonPressed(views::Button* sender, |
| 291 const ui::Event& event) { | 291 const ui::Event& event) { |
| 292 if (sender == new_avatar_button()) { | 292 if (sender == new_avatar_button()) { |
| 293 BrowserWindow::AvatarBubbleMode mode = | 293 BrowserWindow::AvatarBubbleMode mode = |
| 294 BrowserWindow::AVATAR_BUBBLE_MODE_DEFAULT; | 294 BrowserWindow::AVATAR_BUBBLE_MODE_DEFAULT; |
| 295 if (event.IsMouseEvent() && | 295 if ((event.IsMouseEvent() && |
| 296 static_cast<const ui::MouseEvent&>(event).IsRightMouseButton()) { | 296 static_cast<const ui::MouseEvent&>(event).IsRightMouseButton()) || |
| 297 (event.type() == ui::ET_GESTURE_LONG_PRESS)) { |
| 297 mode = BrowserWindow::AVATAR_BUBBLE_MODE_FAST_USER_SWITCH; | 298 mode = BrowserWindow::AVATAR_BUBBLE_MODE_FAST_USER_SWITCH; |
| 298 } | 299 } |
| 299 browser_view()->ShowAvatarBubbleFromAvatarButton( | 300 browser_view()->ShowAvatarBubbleFromAvatarButton( |
| 300 mode, | 301 mode, |
| 301 signin::ManageAccountsParams()); | 302 signin::ManageAccountsParams()); |
| 302 } | 303 } |
| 303 } | 304 } |
| 304 | 305 |
| 305 // BrowserNonClientFrameView: | 306 // BrowserNonClientFrameView: |
| 306 void GlassBrowserFrameView::UpdateNewAvatarButtonImpl() { | 307 void GlassBrowserFrameView::UpdateNewAvatarButtonImpl() { |
| (...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 623 static bool initialized = false; | 624 static bool initialized = false; |
| 624 if (!initialized) { | 625 if (!initialized) { |
| 625 for (int i = 0; i < kThrobberIconCount; ++i) { | 626 for (int i = 0; i < kThrobberIconCount; ++i) { |
| 626 throbber_icons_[i] = | 627 throbber_icons_[i] = |
| 627 ui::LoadThemeIconFromResourcesDataDLL(IDI_THROBBER_01 + i); | 628 ui::LoadThemeIconFromResourcesDataDLL(IDI_THROBBER_01 + i); |
| 628 DCHECK(throbber_icons_[i]); | 629 DCHECK(throbber_icons_[i]); |
| 629 } | 630 } |
| 630 initialized = true; | 631 initialized = true; |
| 631 } | 632 } |
| 632 } | 633 } |
| OLD | NEW |