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

Side by Side Diff: ash/wm/custom_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
« no previous file with comments | « ash/wm/custom_frame_view_ash.h ('k') | ash/wm/dialog_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 "ash/wm/custom_frame_view_ash.h" 5 #include "ash/wm/custom_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 "grit/ash_resources.h" 9 #include "grit/ash_resources.h"
10 #include "grit/ui_strings.h" // Accessibility names 10 #include "grit/ui_strings.h" // Accessibility names
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 98
99 void CustomFrameViewAsh::ResetWindowControls() { 99 void CustomFrameViewAsh::ResetWindowControls() {
100 maximize_button_->SetState(views::CustomButton::BS_NORMAL); 100 maximize_button_->SetState(views::CustomButton::BS_NORMAL);
101 } 101 }
102 102
103 void CustomFrameViewAsh::UpdateWindowIcon() { 103 void CustomFrameViewAsh::UpdateWindowIcon() {
104 if (window_icon_) 104 if (window_icon_)
105 window_icon_->SchedulePaint(); 105 window_icon_->SchedulePaint();
106 } 106 }
107 107
108 void CustomFrameViewAsh::UpdateWindowTitle() {
109 frame_painter_->SchedulePaintForTitle(this, GetTitleFont());
110 }
111
108 //////////////////////////////////////////////////////////////////////////////// 112 ////////////////////////////////////////////////////////////////////////////////
109 // CustomFrameViewAsh, views::View overrides: 113 // CustomFrameViewAsh, views::View overrides:
110 114
111 gfx::Size CustomFrameViewAsh::GetPreferredSize() { 115 gfx::Size CustomFrameViewAsh::GetPreferredSize() {
112 gfx::Size pref = frame_->client_view()->GetPreferredSize(); 116 gfx::Size pref = frame_->client_view()->GetPreferredSize();
113 gfx::Rect bounds(0, 0, pref.width(), pref.height()); 117 gfx::Rect bounds(0, 0, pref.width(), pref.height());
114 return frame_->non_client_view()->GetWindowBoundsForClientBounds( 118 return frame_->non_client_view()->GetWindowBoundsForClientBounds(
115 bounds).size(); 119 bounds).size();
116 } 120 }
117 121
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 // CustomFrameViewAsh, private: 171 // CustomFrameViewAsh, private:
168 172
169 int CustomFrameViewAsh::NonClientTopBorderHeight() const { 173 int CustomFrameViewAsh::NonClientTopBorderHeight() const {
170 // Reserve enough space to see the buttons, including any offset from top and 174 // Reserve enough space to see the buttons, including any offset from top and
171 // reserving space for the separator line. 175 // reserving space for the separator line.
172 return close_button_->bounds().bottom() + 176 return close_button_->bounds().bottom() +
173 frame_painter_->HeaderContentSeparatorSize(); 177 frame_painter_->HeaderContentSeparatorSize();
174 } 178 }
175 179
176 } // namespace ash 180 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/custom_frame_view_ash.h ('k') | ash/wm/dialog_frame_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698