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

Side by Side Diff: chrome/browser/ui/views/web_dialog_view.cc

Issue 10795005: views: Inherit from views::WidgetDelegateView in more places. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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
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 "chrome/browser/ui/views/web_dialog_view.h" 5 #include "chrome/browser/ui/views/web_dialog_view.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/property_bag.h" 9 #include "base/property_bag.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 } 147 }
148 148
149 views::View* WebDialogView::GetInitiallyFocusedView() { 149 views::View* WebDialogView::GetInitiallyFocusedView() {
150 return web_view_; 150 return web_view_;
151 } 151 }
152 152
153 bool WebDialogView::ShouldShowWindowTitle() const { 153 bool WebDialogView::ShouldShowWindowTitle() const {
154 return ShouldShowDialogTitle(); 154 return ShouldShowDialogTitle();
155 } 155 }
156 156
157 views::Widget* WebDialogView::GetWidget() {
158 return View::GetWidget();
159 }
160
161 const views::Widget* WebDialogView::GetWidget() const {
162 return View::GetWidget();
163 }
164
165 //////////////////////////////////////////////////////////////////////////////// 157 ////////////////////////////////////////////////////////////////////////////////
166 // WebDialogDelegate implementation: 158 // WebDialogDelegate implementation:
167 159
168 ui::ModalType WebDialogView::GetDialogModalType() const { 160 ui::ModalType WebDialogView::GetDialogModalType() const {
169 if (delegate_) 161 if (delegate_)
170 return delegate_->GetDialogModalType(); 162 return delegate_->GetDialogModalType();
171 return ui::MODAL_TYPE_NONE; 163 return ui::MODAL_TYPE_NONE;
172 } 164 }
173 165
174 string16 WebDialogView::GetDialogTitle() const { 166 string16 WebDialogView::GetDialogTitle() const {
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 315
324 if (delegate_) { 316 if (delegate_) {
325 gfx::Size out; 317 gfx::Size out;
326 delegate_->GetDialogSize(&out); 318 delegate_->GetDialogSize(&out);
327 if (!out.IsEmpty() && GetWidget()) 319 if (!out.IsEmpty() && GetWidget())
328 GetWidget()->CenterWindow(out); 320 GetWidget()->CenterWindow(out);
329 } 321 }
330 322
331 web_view_->LoadInitialURL(GetDialogContentURL()); 323 web_view_->LoadInitialURL(GetDialogContentURL());
332 } 324 }
OLDNEW
« chrome/browser/ui/views/web_dialog_view.h ('K') | « chrome/browser/ui/views/web_dialog_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698