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

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

Issue 11756005: Implement rough new dialog style. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments. Created 7 years, 11 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/examples/widget_example.cc ('k') | ui/views/window/dialog_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) 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_delegate.h" 5 #include "ui/views/window/dialog_delegate.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "ui/base/ui_base_switches.h" 9 #include "ui/base/ui_base_switches.h"
10 #include "ui/views/controls/button/text_button.h" 10 #include "ui/views/controls/button/text_button.h"
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 99
100 DialogDelegate* DialogDelegate::AsDialogDelegate() { 100 DialogDelegate* DialogDelegate::AsDialogDelegate() {
101 return this; 101 return this;
102 } 102 }
103 103
104 ClientView* DialogDelegate::CreateClientView(Widget* widget) { 104 ClientView* DialogDelegate::CreateClientView(Widget* widget) {
105 return new DialogClientView(widget, GetContentsView()); 105 return new DialogClientView(widget, GetContentsView());
106 } 106 }
107 107
108 NonClientFrameView* DialogDelegate::CreateNonClientFrameView(Widget* widget) { 108 NonClientFrameView* DialogDelegate::CreateNonClientFrameView(Widget* widget) {
109 return UseNewStyle() ? new DialogFrameView() : 109 return UseNewStyle() ? new DialogFrameView(GetWindowTitle()) :
110 WidgetDelegate::CreateNonClientFrameView(widget); 110 WidgetDelegate::CreateNonClientFrameView(widget);
111 } 111 }
112 112
113 const DialogClientView* DialogDelegate::GetDialogClientView() const { 113 const DialogClientView* DialogDelegate::GetDialogClientView() const {
114 return GetWidget()->client_view()->AsDialogClientView(); 114 return GetWidget()->client_view()->AsDialogClientView();
115 } 115 }
116 116
117 DialogClientView* DialogDelegate::GetDialogClientView() { 117 DialogClientView* DialogDelegate::GetDialogClientView() {
118 return GetWidget()->client_view()->AsDialogClientView(); 118 return GetWidget()->client_view()->AsDialogClientView();
119 } 119 }
(...skipping 17 matching lines...) Expand all
137 137
138 const Widget* DialogDelegateView::GetWidget() const { 138 const Widget* DialogDelegateView::GetWidget() const {
139 return View::GetWidget(); 139 return View::GetWidget();
140 } 140 }
141 141
142 View* DialogDelegateView::GetContentsView() { 142 View* DialogDelegateView::GetContentsView() {
143 return this; 143 return this;
144 } 144 }
145 145
146 } // namespace views 146 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/examples/widget_example.cc ('k') | ui/views/window/dialog_frame_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698