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

Side by Side Diff: ui/views/window/custom_frame_view.cc

Issue 10993087: Handle titlebar text updates properly (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Odd - build machine failed to update patch (which I updated successfully) Re-uploading 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
« no previous file with comments | « ui/views/window/custom_frame_view.h ('k') | ui/views/window/native_frame_view.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "ui/views/window/custom_frame_view.h" 5 #include "ui/views/window/custom_frame_view.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 "grit/ui_resources.h" 10 #include "grit/ui_resources.h"
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 minimize_button_->SetState(CustomButton::BS_NORMAL); 204 minimize_button_->SetState(CustomButton::BS_NORMAL);
205 maximize_button_->SetState(CustomButton::BS_NORMAL); 205 maximize_button_->SetState(CustomButton::BS_NORMAL);
206 // The close button isn't affected by this constraint. 206 // The close button isn't affected by this constraint.
207 } 207 }
208 208
209 void CustomFrameView::UpdateWindowIcon() { 209 void CustomFrameView::UpdateWindowIcon() {
210 if (window_icon_) 210 if (window_icon_)
211 window_icon_->SchedulePaint(); 211 window_icon_->SchedulePaint();
212 } 212 }
213 213
214 void CustomFrameView::UpdateWindowTitle() {
215 SchedulePaintInRect(title_bounds_);
216 }
217
214 /////////////////////////////////////////////////////////////////////////////// 218 ///////////////////////////////////////////////////////////////////////////////
215 // CustomFrameView, View overrides: 219 // CustomFrameView, View overrides:
216 220
217 void CustomFrameView::OnPaint(gfx::Canvas* canvas) { 221 void CustomFrameView::OnPaint(gfx::Canvas* canvas) {
218 if (frame_->IsMaximized()) 222 if (frame_->IsMaximized())
219 PaintMaximizedFrameBorder(canvas); 223 PaintMaximizedFrameBorder(canvas);
220 else 224 else
221 PaintRestoredFrameBorder(canvas); 225 PaintRestoredFrameBorder(canvas);
222 PaintTitleBar(canvas); 226 PaintTitleBar(canvas);
223 if (ShouldShowClientEdge()) 227 if (ShouldShowClientEdge())
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
546 rb.GetImageNamed(normal_image_id).ToImageSkia()); 550 rb.GetImageNamed(normal_image_id).ToImageSkia());
547 button->SetImage(CustomButton::BS_HOT, 551 button->SetImage(CustomButton::BS_HOT,
548 rb.GetImageNamed(hot_image_id).ToImageSkia()); 552 rb.GetImageNamed(hot_image_id).ToImageSkia());
549 button->SetImage(CustomButton::BS_PUSHED, 553 button->SetImage(CustomButton::BS_PUSHED,
550 rb.GetImageNamed(pushed_image_id).ToImageSkia()); 554 rb.GetImageNamed(pushed_image_id).ToImageSkia());
551 AddChildView(button); 555 AddChildView(button);
552 return button; 556 return button;
553 } 557 }
554 558
555 } // namespace views 559 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/window/custom_frame_view.h ('k') | ui/views/window/native_frame_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698