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

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

Issue 10993087: Handle titlebar text updates properly (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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) 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/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 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 restore_button_->SetState(views::CustomButton::BS_NORMAL); 370 restore_button_->SetState(views::CustomButton::BS_NORMAL);
371 minimize_button_->SetState(views::CustomButton::BS_NORMAL); 371 minimize_button_->SetState(views::CustomButton::BS_NORMAL);
372 maximize_button_->SetState(views::CustomButton::BS_NORMAL); 372 maximize_button_->SetState(views::CustomButton::BS_NORMAL);
373 // The close button isn't affected by this constraint. 373 // The close button isn't affected by this constraint.
374 } 374 }
375 375
376 void OpaqueBrowserFrameView::UpdateWindowIcon() { 376 void OpaqueBrowserFrameView::UpdateWindowIcon() {
377 window_icon_->SchedulePaint(); 377 window_icon_->SchedulePaint();
378 } 378 }
379 379
380 void OpaqueBrowserFrameView::UpdateWindowTitle() {
381 if (!frame()->IsFullscreen())
382 SchedulePaintInRect(title_bounds_);
msw 2012/09/28 20:10:51 This particular implementation may be unnecessary
Mr4D (OOO till 08-26) 2012/09/28 20:30:48 This particular: You may be right. I was adding th
msw 2012/09/28 20:42:51 Okay, let me know if you'd like my full review her
383 }
384
380 /////////////////////////////////////////////////////////////////////////////// 385 ///////////////////////////////////////////////////////////////////////////////
381 // OpaqueBrowserFrameView, views::View overrides: 386 // OpaqueBrowserFrameView, views::View overrides:
382 387
383 void OpaqueBrowserFrameView::OnPaint(gfx::Canvas* canvas) { 388 void OpaqueBrowserFrameView::OnPaint(gfx::Canvas* canvas) {
384 if (frame()->IsFullscreen()) 389 if (frame()->IsFullscreen())
385 return; // Nothing is visible, so don't bother to paint. 390 return; // Nothing is visible, so don't bother to paint.
386 391
387 if (frame()->IsMaximized()) 392 if (frame()->IsMaximized())
388 PaintMaximizedFrameBorder(canvas); 393 PaintMaximizedFrameBorder(canvas);
389 else 394 else
(...skipping 657 matching lines...) Expand 10 before | Expand all | Expand 10 after
1047 1052
1048 gfx::Rect OpaqueBrowserFrameView::CalculateClientAreaBounds(int width, 1053 gfx::Rect OpaqueBrowserFrameView::CalculateClientAreaBounds(int width,
1049 int height) const { 1054 int height) const {
1050 int top_height = NonClientTopBorderHeight(false); 1055 int top_height = NonClientTopBorderHeight(false);
1051 int border_thickness = NonClientBorderThickness(); 1056 int border_thickness = NonClientBorderThickness();
1052 return gfx::Rect(border_thickness, top_height, 1057 return gfx::Rect(border_thickness, top_height,
1053 std::max(0, width - (2 * border_thickness)), 1058 std::max(0, width - (2 * border_thickness)),
1054 std::max(0, height - GetReservedHeight() - 1059 std::max(0, height - GetReservedHeight() -
1055 top_height - border_thickness)); 1060 top_height - border_thickness));
1056 } 1061 }
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