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

Side by Side Diff: ui/views/bubble/bubble_frame_view.cc

Issue 58863002: Update Views bubble frames on Windows theme changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Simplify changes. Created 7 years, 1 month 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/bubble/bubble_frame_view.h ('k') | no next file » | 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/bubble/bubble_frame_view.h" 5 #include "ui/views/bubble/bubble_frame_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "grit/ui_resources.h" 9 #include "grit/ui_resources.h"
10 #include "ui/base/hit_test.h" 10 #include "ui/base/hit_test.h"
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 206
207 const char* BubbleFrameView::GetClassName() const { 207 const char* BubbleFrameView::GetClassName() const {
208 return kViewClassName; 208 return kViewClassName;
209 } 209 }
210 210
211 void BubbleFrameView::ChildPreferredSizeChanged(View* child) { 211 void BubbleFrameView::ChildPreferredSizeChanged(View* child) {
212 if (child == titlebar_extra_view_ || child == title_) 212 if (child == titlebar_extra_view_ || child == title_)
213 Layout(); 213 Layout();
214 } 214 }
215 215
216 void BubbleFrameView::OnThemeChanged() {
217 UpdateWindowTitle();
218 ResetWindowControls();
219 UpdateWindowIcon();
220 }
221
216 void BubbleFrameView::ButtonPressed(Button* sender, const ui::Event& event) { 222 void BubbleFrameView::ButtonPressed(Button* sender, const ui::Event& event) {
217 if (sender == close_) 223 if (sender == close_)
218 GetWidget()->Close(); 224 GetWidget()->Close();
219 } 225 }
220 226
221 void BubbleFrameView::SetBubbleBorder(BubbleBorder* border) { 227 void BubbleFrameView::SetBubbleBorder(BubbleBorder* border) {
222 bubble_border_ = border; 228 bubble_border_ = border;
223 set_border(bubble_border_); 229 set_border(bubble_border_);
224 230
225 // Update the background, which relies on the border. 231 // Update the background, which relies on the border.
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 title_bar_width += kTitleLeftInset + title_->GetPreferredSize().width(); 342 title_bar_width += kTitleLeftInset + title_->GetPreferredSize().width();
337 if (close_->visible()) 343 if (close_->visible())
338 title_bar_width += close_->width() + 1; 344 title_bar_width += close_->width() + 1;
339 if (titlebar_extra_view_ != NULL) 345 if (titlebar_extra_view_ != NULL)
340 title_bar_width += titlebar_extra_view_->GetPreferredSize().width(); 346 title_bar_width += titlebar_extra_view_->GetPreferredSize().width();
341 size.SetToMax(gfx::Size(title_bar_width, 0)); 347 size.SetToMax(gfx::Size(title_bar_width, 0));
342 return size; 348 return size;
343 } 349 }
344 350
345 } // namespace views 351 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/bubble/bubble_frame_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698