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

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

Issue 7015051: Re-land: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 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 | « views/window/custom_frame_view.cc ('k') | views/window/native_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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "views/window/dialog_client_view.h" 5 #include "views/window/dialog_client_view.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windows.h> 8 #include <windows.h>
9 #include <uxtheme.h> 9 #include <uxtheme.h>
10 #include <vsstyle.h> 10 #include <vsstyle.h>
(...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after
534 size_extra_view_height_to_buttons_ = 534 size_extra_view_height_to_buttons_ =
535 GetDialogDelegate()->GetSizeExtraViewHeightToButtons(); 535 GetDialogDelegate()->GetSizeExtraViewHeightToButtons();
536 } 536 }
537 } 537 }
538 538
539 DialogDelegate* DialogClientView::GetDialogDelegate() const { 539 DialogDelegate* DialogClientView::GetDialogDelegate() const {
540 return window()->window_delegate()->AsDialogDelegate(); 540 return window()->window_delegate()->AsDialogDelegate();
541 } 541 }
542 542
543 void DialogClientView::Close() { 543 void DialogClientView::Close() {
544 window()->CloseWindow(); 544 window()->Close();
545 GetDialogDelegate()->OnClose(); 545 GetDialogDelegate()->OnClose();
546 } 546 }
547 547
548 void DialogClientView::UpdateFocusListener() { 548 void DialogClientView::UpdateFocusListener() {
549 FocusManager* focus_manager = GetFocusManager(); 549 FocusManager* focus_manager = GetFocusManager();
550 // Listen for focus change events so we can update the default button. 550 // Listen for focus change events so we can update the default button.
551 // focus_manager can be NULL when the dialog is created on un-shown view. 551 // focus_manager can be NULL when the dialog is created on un-shown view.
552 // We start listening for focus changes when the page is visible. 552 // We start listening for focus changes when the page is visible.
553 // Focus manager could also change if window host changes a parent. 553 // Focus manager could also change if window host changes a parent.
554 if (listening_to_focus_) { 554 if (listening_to_focus_) {
(...skipping 16 matching lines...) Expand all
571 void DialogClientView::InitClass() { 571 void DialogClientView::InitClass() {
572 static bool initialized = false; 572 static bool initialized = false;
573 if (!initialized) { 573 if (!initialized) {
574 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); 574 ResourceBundle& rb = ResourceBundle::GetSharedInstance();
575 dialog_button_font_ = new gfx::Font(rb.GetFont(ResourceBundle::BaseFont)); 575 dialog_button_font_ = new gfx::Font(rb.GetFont(ResourceBundle::BaseFont));
576 initialized = true; 576 initialized = true;
577 } 577 }
578 } 578 }
579 579
580 } // namespace views 580 } // namespace views
OLDNEW
« no previous file with comments | « views/window/custom_frame_view.cc ('k') | views/window/native_frame_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698