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

Side by Side Diff: chrome/browser/ui/views/ash/browser_non_client_frame_view_ash.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
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/ash/browser_non_client_frame_view_ash.h" 5 #include "chrome/browser/ui/views/ash/browser_non_client_frame_view_ash.h"
6 6
7 #include "ash/wm/frame_painter.h" 7 #include "ash/wm/frame_painter.h"
8 #include "ash/wm/workspace/frame_maximize_button.h" 8 #include "ash/wm/workspace/frame_maximize_button.h"
9 #include "chrome/browser/themes/theme_service.h" 9 #include "chrome/browser/themes/theme_service.h"
10 #include "chrome/browser/ui/browser.h" 10 #include "chrome/browser/ui/browser.h"
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 void BrowserNonClientFrameViewAsh::ResetWindowControls() { 254 void BrowserNonClientFrameViewAsh::ResetWindowControls() {
255 size_button_->SetState(views::CustomButton::BS_NORMAL); 255 size_button_->SetState(views::CustomButton::BS_NORMAL);
256 // The close button isn't affected by this constraint. 256 // The close button isn't affected by this constraint.
257 } 257 }
258 258
259 void BrowserNonClientFrameViewAsh::UpdateWindowIcon() { 259 void BrowserNonClientFrameViewAsh::UpdateWindowIcon() {
260 if (window_icon_) 260 if (window_icon_)
261 window_icon_->SchedulePaint(); 261 window_icon_->SchedulePaint();
262 } 262 }
263 263
264 void BrowserNonClientFrameViewAsh::UpdateWindowTitle() {
265 if (!frame()->IsFullscreen())
266 frame_painter_->SchedulePaintForTitle(this, BrowserFrame::GetTitleFont());
267 }
268
264 /////////////////////////////////////////////////////////////////////////////// 269 ///////////////////////////////////////////////////////////////////////////////
265 // views::View overrides: 270 // views::View overrides:
266 271
267 void BrowserNonClientFrameViewAsh::OnPaint(gfx::Canvas* canvas) { 272 void BrowserNonClientFrameViewAsh::OnPaint(gfx::Canvas* canvas) {
268 if (frame()->IsFullscreen()) 273 if (frame()->IsFullscreen())
269 return; // Nothing visible, don't paint. 274 return; // Nothing visible, don't paint.
270 // The primary header image changes based on window activation state and 275 // The primary header image changes based on window activation state and
271 // theme, so we look it up for each paint. 276 // theme, so we look it up for each paint.
272 frame_painter_->PaintHeader( 277 frame_painter_->PaintHeader(
273 this, 278 this,
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
599 BrowserNonClientFrameViewAsh::GetThemeFrameOverlayImage() const { 604 BrowserNonClientFrameViewAsh::GetThemeFrameOverlayImage() const {
600 ui::ThemeProvider* tp = GetThemeProvider(); 605 ui::ThemeProvider* tp = GetThemeProvider();
601 if (tp->HasCustomImage(IDR_THEME_FRAME_OVERLAY) && 606 if (tp->HasCustomImage(IDR_THEME_FRAME_OVERLAY) &&
602 browser_view()->IsBrowserTypeNormal() && 607 browser_view()->IsBrowserTypeNormal() &&
603 !browser_view()->IsOffTheRecord()) { 608 !browser_view()->IsOffTheRecord()) {
604 return tp->GetImageSkiaNamed(ShouldPaintAsActive() ? 609 return tp->GetImageSkiaNamed(ShouldPaintAsActive() ?
605 IDR_THEME_FRAME_OVERLAY : IDR_THEME_FRAME_OVERLAY_INACTIVE); 610 IDR_THEME_FRAME_OVERLAY : IDR_THEME_FRAME_OVERLAY_INACTIVE);
606 } 611 }
607 return NULL; 612 return NULL;
608 } 613 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698