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: views/window/dialog_delegate.cc

Issue 7054052: Move more from Window onto Widget. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 6 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/dialog_delegate.h ('k') | views/window/native_window.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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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_delegate.h" 5 #include "views/window/dialog_delegate.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "views/controls/button/native_button.h" 8 #include "views/controls/button/native_button.h"
9 #include "views/window/window.h" 9 #include "views/window/window.h"
10 10
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 return NULL; 83 return NULL;
84 } 84 }
85 85
86 if (default_button & MessageBoxFlags::DIALOGBUTTON_OK) 86 if (default_button & MessageBoxFlags::DIALOGBUTTON_OK)
87 return dcv->ok_button(); 87 return dcv->ok_button();
88 if (default_button & MessageBoxFlags::DIALOGBUTTON_CANCEL) 88 if (default_button & MessageBoxFlags::DIALOGBUTTON_CANCEL)
89 return dcv->cancel_button(); 89 return dcv->cancel_button();
90 return NULL; 90 return NULL;
91 } 91 }
92 92
93 ClientView* DialogDelegate::CreateClientView(Window* window) { 93 ClientView* DialogDelegate::CreateClientView(Widget* widget) {
94 return new DialogClientView(window, GetContentsView()); 94 return new DialogClientView(widget, GetContentsView());
95 } 95 }
96 96
97 DialogClientView* DialogDelegate::GetDialogClientView() const { 97 DialogClientView* DialogDelegate::GetDialogClientView() const {
98 return window()->client_view()->AsDialogClientView(); 98 return window()->client_view()->AsDialogClientView();
99 } 99 }
100 100
101 ui::AccessibilityTypes::Role DialogDelegate::GetAccessibleWindowRole() const { 101 ui::AccessibilityTypes::Role DialogDelegate::GetAccessibleWindowRole() const {
102 return ui::AccessibilityTypes::ROLE_DIALOG; 102 return ui::AccessibilityTypes::ROLE_DIALOG;
103 } 103 }
104 104
105 } // namespace views 105 } // namespace views
OLDNEW
« no previous file with comments | « views/window/dialog_delegate.h ('k') | views/window/native_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698