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

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

Issue 200483004: Show avatar icon on V2 app's frame (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/ash/session_state_delegate_views.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 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/frame/browser_header_painter_ash.h" 5 #include "chrome/browser/ui/views/frame/browser_header_painter_ash.h"
6 6
7 #include "ash/frame/caption_buttons/frame_caption_button_container_view.h" 7 #include "ash/frame/caption_buttons/frame_caption_button_container_view.h"
8 #include "ash/frame/header_painter_util.h" 8 #include "ash/frame/header_painter_util.h"
9 #include "base/logging.h" // DCHECK 9 #include "base/logging.h" // DCHECK
10 #include "chrome/browser/ui/browser.h" 10 #include "chrome/browser/ui/browser.h"
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 caption_button_container_->GetPreferredSize(); 241 caption_button_container_->GetPreferredSize();
242 caption_button_container_->SetBounds( 242 caption_button_container_->SetBounds(
243 view_->width() - caption_button_container_size.width(), 243 view_->width() - caption_button_container_size.width(),
244 0, 244 0,
245 caption_button_container_size.width(), 245 caption_button_container_size.width(),
246 caption_button_container_size.height()); 246 caption_button_container_size.height());
247 247
248 if (window_icon_) { 248 if (window_icon_) {
249 // Vertically center the window icon with respect to the caption button 249 // Vertically center the window icon with respect to the caption button
250 // container. 250 // container.
251 int icon_size = ash::HeaderPainterUtil::GetIconSize(); 251 int icon_size = ash::HeaderPainterUtil::GetDefaultIconSize();
252 int icon_offset_y = (caption_button_container_->height() - icon_size) / 2; 252 int icon_offset_y = (caption_button_container_->height() - icon_size) / 2;
253 window_icon_->SetBounds(ash::HeaderPainterUtil::GetIconXOffset(), 253 window_icon_->SetBounds(ash::HeaderPainterUtil::GetIconXOffset(),
254 icon_offset_y, icon_size, icon_size); 254 icon_offset_y, icon_size, icon_size);
255 } 255 }
256 } 256 }
257 257
258 int BrowserHeaderPainterAsh::GetHeaderHeightForPainting() const { 258 int BrowserHeaderPainterAsh::GetHeaderHeightForPainting() const {
259 return painted_height_; 259 return painted_height_;
260 } 260 }
261 261
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 } 465 }
466 466
467 gfx::Rect BrowserHeaderPainterAsh::GetPaintedBounds() const { 467 gfx::Rect BrowserHeaderPainterAsh::GetPaintedBounds() const {
468 return gfx::Rect(view_->width(), painted_height_); 468 return gfx::Rect(view_->width(), painted_height_);
469 } 469 }
470 470
471 gfx::Rect BrowserHeaderPainterAsh::GetTitleBounds() const { 471 gfx::Rect BrowserHeaderPainterAsh::GetTitleBounds() const {
472 return ash::HeaderPainterUtil::GetTitleBounds(window_icon_, 472 return ash::HeaderPainterUtil::GetTitleBounds(window_icon_,
473 caption_button_container_, BrowserFrame::GetTitleFontList()); 473 caption_button_container_, BrowserFrame::GetTitleFontList());
474 } 474 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/session_state_delegate_views.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698