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

Side by Side Diff: ash/wm/frame_painter.h

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/dialog_frame_view.cc ('k') | ash/wm/frame_painter.cc » ('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 #ifndef ASH_WM_FRAME_PAINTER_H_ 5 #ifndef ASH_WM_FRAME_PAINTER_H_
6 #define ASH_WM_FRAME_PAINTER_H_ 6 #define ASH_WM_FRAME_PAINTER_H_
7 7
8 #include <set> 8 #include <set>
9 9
10 #include "ash/ash_export.h" 10 #include "ash/ash_export.h"
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 // Paint the title bar, primarily the title string. 105 // Paint the title bar, primarily the title string.
106 void PaintTitleBar(views::NonClientFrameView* view, 106 void PaintTitleBar(views::NonClientFrameView* view,
107 gfx::Canvas* canvas, 107 gfx::Canvas* canvas,
108 const gfx::Font& title_font); 108 const gfx::Font& title_font);
109 109
110 // Performs layout for the header based on whether we want the shorter 110 // Performs layout for the header based on whether we want the shorter
111 // appearance. |shorter_layout| is typically used for maximized windows, but 111 // appearance. |shorter_layout| is typically used for maximized windows, but
112 // not always. 112 // not always.
113 void LayoutHeader(views::NonClientFrameView* view, bool shorter_layout); 113 void LayoutHeader(views::NonClientFrameView* view, bool shorter_layout);
114 114
115 // Schedule a re-paint of the entire title.
116 void SchedulePaintForTitle(views::NonClientFrameView* view,
117 const gfx::Font& title_font);
118
115 // aura::WindowObserver overrides: 119 // aura::WindowObserver overrides:
116 virtual void OnWindowPropertyChanged(aura::Window* window, 120 virtual void OnWindowPropertyChanged(aura::Window* window,
117 const void* key, 121 const void* key,
118 intptr_t old) OVERRIDE; 122 intptr_t old) OVERRIDE;
119 virtual void OnWindowVisibilityChanged(aura::Window* window, 123 virtual void OnWindowVisibilityChanged(aura::Window* window,
120 bool visible) OVERRIDE; 124 bool visible) OVERRIDE;
121 virtual void OnWindowDestroying(aura::Window* window) OVERRIDE; 125 virtual void OnWindowDestroying(aura::Window* window) OVERRIDE;
122 virtual void OnWindowBoundsChanged(aura::Window* window, 126 virtual void OnWindowBoundsChanged(aura::Window* window,
123 const gfx::Rect& old_bounds, 127 const gfx::Rect& old_bounds,
124 const gfx::Rect& new_bounds) OVERRIDE; 128 const gfx::Rect& new_bounds) OVERRIDE;
(...skipping 30 matching lines...) Expand all
155 159
156 // Schedules a paint for the window header of the solo window. Invoke this 160 // Schedules a paint for the window header of the solo window. Invoke this
157 // when another window is hidden or destroyed to force the transparency of 161 // when another window is hidden or destroyed to force the transparency of
158 // the now-solo window to update. 162 // the now-solo window to update.
159 static void SchedulePaintForSoloWindow(); 163 static void SchedulePaintForSoloWindow();
160 164
161 // Schedules a paint for the header. Used when transitioning from no header to 165 // Schedules a paint for the header. Used when transitioning from no header to
162 // a header (or other way around). 166 // a header (or other way around).
163 void SchedulePaintForHeader(); 167 void SchedulePaintForHeader();
164 168
169 // Get the bounds for the title. The provided |view| and |title_font| are
170 // used to determine the correct dimensions.
171 gfx::Rect GetTitleBounds(views::NonClientFrameView* view,
172 const gfx::Font& title_font);
173
165 static std::set<FramePainter*>* instances_; 174 static std::set<FramePainter*>* instances_;
166 175
167 // Not owned 176 // Not owned
168 views::Widget* frame_; 177 views::Widget* frame_;
169 views::View* window_icon_; // May be NULL. 178 views::View* window_icon_; // May be NULL.
170 views::ImageButton* size_button_; 179 views::ImageButton* size_button_;
171 views::ImageButton* close_button_; 180 views::ImageButton* close_button_;
172 aura::Window* window_; 181 aura::Window* window_;
173 182
174 // Window frame header/caption parts. 183 // Window frame header/caption parts.
(...skipping 16 matching lines...) Expand all
191 scoped_ptr<ui::SlideAnimation> crossfade_animation_; 200 scoped_ptr<ui::SlideAnimation> crossfade_animation_;
192 201
193 SizeButtonBehavior size_button_behavior_; 202 SizeButtonBehavior size_button_behavior_;
194 203
195 DISALLOW_COPY_AND_ASSIGN(FramePainter); 204 DISALLOW_COPY_AND_ASSIGN(FramePainter);
196 }; 205 };
197 206
198 } // namespace ash 207 } // namespace ash
199 208
200 #endif // ASH_WM_FRAME_PAINTER_H_ 209 #endif // ASH_WM_FRAME_PAINTER_H_
OLDNEW
« no previous file with comments | « ash/wm/dialog_frame_view.cc ('k') | ash/wm/frame_painter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698