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

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

Issue 14895004: Fixing autocheckout progress bar repaint bug. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 7 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/dialog_client_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/window/dialog_client_view.h" 5 #include "ui/views/window/dialog_client_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "ui/base/keycodes/keyboard_codes.h" 9 #include "ui/base/keycodes/keyboard_codes.h"
10 #include "ui/views/controls/button/label_button.h" 10 #include "ui/views/controls/button/label_button.h"
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 331
332 void DialogClientView::CreateFootnoteView() { 332 void DialogClientView::CreateFootnoteView() {
333 if (footnote_view_) 333 if (footnote_view_)
334 return; 334 return;
335 335
336 footnote_view_ = GetDialogDelegate()->CreateFootnoteView(); 336 footnote_view_ = GetDialogDelegate()->CreateFootnoteView();
337 if (footnote_view_) 337 if (footnote_view_)
338 AddChildView(footnote_view_); 338 AddChildView(footnote_view_);
339 } 339 }
340 340
341 void DialogClientView::ChildPreferredSizeChanged(View* child) {
342 if (child == footnote_view_ || child == extra_view_)
343 Layout();
344 }
345
346 void DialogClientView::ChildVisibilityChanged(View* child) {
347 ChildPreferredSizeChanged(child);
348 }
349
341 //////////////////////////////////////////////////////////////////////////////// 350 ////////////////////////////////////////////////////////////////////////////////
342 // DialogClientView, private: 351 // DialogClientView, private:
343 352
344 LabelButton* DialogClientView::CreateDialogButton(ui::DialogButton type) { 353 LabelButton* DialogClientView::CreateDialogButton(ui::DialogButton type) {
345 const string16 title = GetDialogDelegate()->GetDialogButtonLabel(type); 354 const string16 title = GetDialogDelegate()->GetDialogButtonLabel(type);
346 LabelButton* button = new LabelButton(this, title); 355 LabelButton* button = new LabelButton(this, title);
347 button->SetStyle(Button::STYLE_NATIVE_TEXTBUTTON); 356 button->SetStyle(Button::STYLE_NATIVE_TEXTBUTTON);
348 button->set_focusable(true); 357 button->set_focusable(true);
349 358
350 const int kDialogMinButtonWidth = 75; 359 const int kDialogMinButtonWidth = 75;
(...skipping 26 matching lines...) Expand all
377 gfx::Insets(0, kButtonHEdgeMargin, 386 gfx::Insets(0, kButtonHEdgeMargin,
378 kButtonVEdgeMargin, kButtonHEdgeMargin); 387 kButtonVEdgeMargin, kButtonHEdgeMargin);
379 } 388 }
380 389
381 void DialogClientView::Close() { 390 void DialogClientView::Close() {
382 GetWidget()->Close(); 391 GetWidget()->Close();
383 GetDialogDelegate()->OnClose(); 392 GetDialogDelegate()->OnClose();
384 } 393 }
385 394
386 } // namespace views 395 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/window/dialog_client_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698