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

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

Issue 11953066: Reland 179231 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
« ash/launcher/launcher.cc ('K') | « ui/views/window/dialog_delegate.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_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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 } 119 }
120 120
121 ui::AccessibilityTypes::Role DialogDelegate::GetAccessibleWindowRole() const { 121 ui::AccessibilityTypes::Role DialogDelegate::GetAccessibleWindowRole() const {
122 return ui::AccessibilityTypes::ROLE_DIALOG; 122 return ui::AccessibilityTypes::ROLE_DIALOG;
123 } 123 }
124 124
125 //////////////////////////////////////////////////////////////////////////////// 125 ////////////////////////////////////////////////////////////////////////////////
126 // DialogDelegateView: 126 // DialogDelegateView:
127 127
128 DialogDelegateView::DialogDelegateView() { 128 DialogDelegateView::DialogDelegateView() {
129 // A WidgetDelegate should be deleted on DeleteDelegate.
130 set_owned_by_client();
129 } 131 }
130 132
131 DialogDelegateView::~DialogDelegateView() { 133 DialogDelegateView::~DialogDelegateView() {
132 } 134 }
133 135
136 void DialogDelegateView::DeleteDelegate() {
137 delete this;
138 }
139
134 Widget* DialogDelegateView::GetWidget() { 140 Widget* DialogDelegateView::GetWidget() {
135 return View::GetWidget(); 141 return View::GetWidget();
136 } 142 }
137 143
138 const Widget* DialogDelegateView::GetWidget() const { 144 const Widget* DialogDelegateView::GetWidget() const {
139 return View::GetWidget(); 145 return View::GetWidget();
140 } 146 }
141 147
142 View* DialogDelegateView::GetContentsView() { 148 View* DialogDelegateView::GetContentsView() {
143 return this; 149 return this;
144 } 150 }
145 151
146 } // namespace views 152 } // namespace views
OLDNEW
« ash/launcher/launcher.cc ('K') | « ui/views/window/dialog_delegate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698