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

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

Issue 8356028: Add shortcut to show avatar menu (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix build error Created 9 years, 2 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/opaque_browser_frame_view.h" 5 #include "chrome/browser/ui/views/frame/opaque_browser_frame_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
391 restore_button_->SetState(views::CustomButton::BS_NORMAL); 391 restore_button_->SetState(views::CustomButton::BS_NORMAL);
392 minimize_button_->SetState(views::CustomButton::BS_NORMAL); 392 minimize_button_->SetState(views::CustomButton::BS_NORMAL);
393 maximize_button_->SetState(views::CustomButton::BS_NORMAL); 393 maximize_button_->SetState(views::CustomButton::BS_NORMAL);
394 // The close button isn't affected by this constraint. 394 // The close button isn't affected by this constraint.
395 } 395 }
396 396
397 void OpaqueBrowserFrameView::UpdateWindowIcon() { 397 void OpaqueBrowserFrameView::UpdateWindowIcon() {
398 window_icon_->SchedulePaint(); 398 window_icon_->SchedulePaint();
399 } 399 }
400 400
401 AvatarMenuButton* OpaqueBrowserFrameView::GetAvatarMenuButton() {
402 return avatar_button_.get();
403 }
404
401 /////////////////////////////////////////////////////////////////////////////// 405 ///////////////////////////////////////////////////////////////////////////////
402 // OpaqueBrowserFrameView, views::View overrides: 406 // OpaqueBrowserFrameView, views::View overrides:
403 407
404 void OpaqueBrowserFrameView::OnPaint(gfx::Canvas* canvas) { 408 void OpaqueBrowserFrameView::OnPaint(gfx::Canvas* canvas) {
405 if (frame_->IsFullscreen()) 409 if (frame_->IsFullscreen())
406 return; // Nothing is visible, so don't bother to paint. 410 return; // Nothing is visible, so don't bother to paint.
407 411
408 if (frame_->IsMaximized()) 412 if (frame_->IsMaximized())
409 PaintMaximizedFrameBorder(canvas); 413 PaintMaximizedFrameBorder(canvas);
410 else 414 else
(...skipping 726 matching lines...) Expand 10 before | Expand all | Expand 10 after
1137 ProfileInfoCache& cache = 1141 ProfileInfoCache& cache =
1138 g_browser_process->profile_manager()->GetProfileInfoCache(); 1142 g_browser_process->profile_manager()->GetProfileInfoCache();
1139 Profile* profile = browser_view_->browser()->profile(); 1143 Profile* profile = browser_view_->browser()->profile();
1140 size_t index = cache.GetIndexOfProfileWithPath(profile->GetPath()); 1144 size_t index = cache.GetIndexOfProfileWithPath(profile->GetPath());
1141 if (index != std::string::npos) { 1145 if (index != std::string::npos) {
1142 avatar_button_->SetIcon(cache.GetAvatarIconOfProfileAtIndex(index)); 1146 avatar_button_->SetIcon(cache.GetAvatarIconOfProfileAtIndex(index));
1143 avatar_button_->SetText(cache.GetNameOfProfileAtIndex(index)); 1147 avatar_button_->SetText(cache.GetNameOfProfileAtIndex(index));
1144 } 1148 }
1145 } 1149 }
1146 } 1150 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/frame/opaque_browser_frame_view.h ('k') | chrome/browser/ui/views/frame/popup_non_client_frame_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698