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

Side by Side Diff: chrome/browser/ui/views/constrained_window_views.cc

Issue 9021046: Pass const gfx::Rect& as the first parameter to FillRect. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: one more fix Created 8 years, 10 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) 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/constrained_window_views.h" 5 #include "chrome/browser/ui/views/constrained_window_views.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/app/chrome_command_ids.h" 10 #include "chrome/app/chrome_command_ids.h"
(...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after
479 *title_font_, GetTitleColor(), GetMirroredXForRect(title_bounds_), 479 *title_font_, GetTitleColor(), GetMirroredXForRect(title_bounds_),
480 title_bounds_.y(), title_bounds_.width(), title_bounds_.height()); 480 title_bounds_.y(), title_bounds_.width(), title_bounds_.height());
481 } 481 }
482 482
483 void ConstrainedWindowFrameView::PaintClientEdge(gfx::Canvas* canvas) { 483 void ConstrainedWindowFrameView::PaintClientEdge(gfx::Canvas* canvas) {
484 gfx::Rect client_edge_bounds(CalculateClientAreaBounds(width(), height())); 484 gfx::Rect client_edge_bounds(CalculateClientAreaBounds(width(), height()));
485 client_edge_bounds.Inset(-kClientEdgeThickness, -kClientEdgeThickness); 485 client_edge_bounds.Inset(-kClientEdgeThickness, -kClientEdgeThickness);
486 gfx::Rect frame_shadow_bounds(client_edge_bounds); 486 gfx::Rect frame_shadow_bounds(client_edge_bounds);
487 frame_shadow_bounds.Inset(-kFrameShadowThickness, -kFrameShadowThickness); 487 frame_shadow_bounds.Inset(-kFrameShadowThickness, -kFrameShadowThickness);
488 488
489 canvas->FillRect(kContentsBorderShadow, frame_shadow_bounds); 489 canvas->FillRect(frame_shadow_bounds, kContentsBorderShadow);
490 canvas->FillRect(ResourceBundle::toolbar_color, client_edge_bounds); 490 canvas->FillRect(client_edge_bounds, ResourceBundle::toolbar_color);
491 } 491 }
492 492
493 void ConstrainedWindowFrameView::LayoutWindowControls() { 493 void ConstrainedWindowFrameView::LayoutWindowControls() {
494 gfx::Size close_button_size = close_button_->GetPreferredSize(); 494 gfx::Size close_button_size = close_button_->GetPreferredSize();
495 close_button_->SetBounds( 495 close_button_->SetBounds(
496 width() - kFrameBorderThickness - close_button_size.width(), 496 width() - kFrameBorderThickness - close_button_size.width(),
497 kFrameShadowThickness, close_button_size.width(), 497 kFrameShadowThickness, close_button_size.width(),
498 close_button_size.height()); 498 close_button_size.height());
499 } 499 }
500 500
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
625 } 625 }
626 626
627 void ConstrainedWindowViews::OnNativeConstrainedWindowMouseActivate() { 627 void ConstrainedWindowViews::OnNativeConstrainedWindowMouseActivate() {
628 Activate(); 628 Activate();
629 } 629 }
630 630
631 views::internal::NativeWidgetDelegate* 631 views::internal::NativeWidgetDelegate*
632 ConstrainedWindowViews::AsNativeWidgetDelegate() { 632 ConstrainedWindowViews::AsNativeWidgetDelegate() {
633 return this; 633 return this;
634 } 634 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/browser_actions_container.cc ('k') | chrome/browser/ui/views/default_search_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698