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

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

Issue 1011233002: Enable fast user switching in Win8/Ash mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase + fix conflict Created 5 years, 9 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/browser_commands.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.h" 5 #include "chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "ash/frame/caption_buttons/frame_caption_button_container_view.h" 9 #include "ash/frame/caption_buttons/frame_caption_button_container_view.h"
10 #include "ash/frame/default_header_painter.h" 10 #include "ash/frame/default_header_painter.h"
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after
449 return gfx::ImageSkia(); 449 return gfx::ImageSkia();
450 return delegate->GetWindowIcon(); 450 return delegate->GetWindowIcon();
451 } 451 }
452 452
453 /////////////////////////////////////////////////////////////////////////////// 453 ///////////////////////////////////////////////////////////////////////////////
454 // views::ButtonListener: 454 // views::ButtonListener:
455 455
456 void BrowserNonClientFrameViewAsh::ButtonPressed(views::Button* sender, 456 void BrowserNonClientFrameViewAsh::ButtonPressed(views::Button* sender,
457 const ui::Event& event) { 457 const ui::Event& event) {
458 DCHECK(sender == new_avatar_button()); 458 DCHECK(sender == new_avatar_button());
459 chrome::ExecuteCommand(browser_view()->browser(), IDC_SHOW_AVATAR_MENU); 459 int command = IDC_SHOW_AVATAR_MENU;
460 if (event.IsMouseEvent() &&
461 static_cast<const ui::MouseEvent&>(event).IsRightMouseButton()) {
462 command = IDC_SHOW_FAST_USER_SWITCHER;
463 }
464 chrome::ExecuteCommand(browser_view()->browser(), command);
460 } 465 }
461 466
462 /////////////////////////////////////////////////////////////////////////////// 467 ///////////////////////////////////////////////////////////////////////////////
463 // BrowserNonClientFrameViewAsh, protected: 468 // BrowserNonClientFrameViewAsh, protected:
464 469
465 // BrowserNonClientFrameView: 470 // BrowserNonClientFrameView:
466 void BrowserNonClientFrameViewAsh::UpdateNewStyleAvatar() { 471 void BrowserNonClientFrameViewAsh::UpdateNewStyleAvatar() {
467 UpdateNewStyleAvatarInfo(this, NewAvatarButton::NATIVE_BUTTON); 472 UpdateNewStyleAvatarInfo(this, NewAvatarButton::NATIVE_BUTTON);
468 } 473 }
469 474
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
686 ThemeProperties::COLOR_TOOLBAR_SEPARATOR)); 691 ThemeProperties::COLOR_TOOLBAR_SEPARATOR));
687 } 692 }
688 693
689 void BrowserNonClientFrameViewAsh::PaintContentEdge(gfx::Canvas* canvas) { 694 void BrowserNonClientFrameViewAsh::PaintContentEdge(gfx::Canvas* canvas) {
690 DCHECK(!UsePackagedAppHeaderStyle() && !UseWebAppHeaderStyle()); 695 DCHECK(!UsePackagedAppHeaderStyle() && !UseWebAppHeaderStyle());
691 canvas->FillRect(gfx::Rect(0, caption_button_container_->bounds().bottom(), 696 canvas->FillRect(gfx::Rect(0, caption_button_container_->bounds().bottom(),
692 width(), kClientEdgeThickness), 697 width(), kClientEdgeThickness),
693 ThemeProperties::GetDefaultColor( 698 ThemeProperties::GetDefaultColor(
694 ThemeProperties::COLOR_TOOLBAR_SEPARATOR)); 699 ThemeProperties::COLOR_TOOLBAR_SEPARATOR));
695 } 700 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_commands.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698