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

Side by Side Diff: chrome/browser/chromeos/login/ui/simple_web_view_dialog.cc

Issue 2390953004: WidgetDelegateView is its own contents view. (Closed)
Patch Set: another minor fix Created 4 years, 2 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/chromeos/login/ui/simple_web_view_dialog.h" 5 #include "chrome/browser/chromeos/login/ui/simple_web_view_dialog.h"
6 6
7 #include "ash/common/shell_window_ids.h" 7 #include "ash/common/shell_window_ids.h"
8 #include "ash/shell.h" 8 #include "ash/shell.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 bounds.Inset(kExternalMargin, kExternalMargin); 241 bounds.Inset(kExternalMargin, kExternalMargin);
242 layout->set_minimum_size(bounds.size()); 242 layout->set_minimum_size(bounds.size());
243 243
244 Layout(); 244 Layout();
245 } 245 }
246 246
247 void SimpleWebViewDialog::Layout() { 247 void SimpleWebViewDialog::Layout() {
248 views::WidgetDelegateView::Layout(); 248 views::WidgetDelegateView::Layout();
249 } 249 }
250 250
251 views::View* SimpleWebViewDialog::GetContentsView() {
252 return this;
253 }
254
255 views::View* SimpleWebViewDialog::GetInitiallyFocusedView() { 251 views::View* SimpleWebViewDialog::GetInitiallyFocusedView() {
256 return web_view_; 252 return web_view_;
257 } 253 }
258 254
259 void SimpleWebViewDialog::ButtonPressed(views::Button* sender, 255 void SimpleWebViewDialog::ButtonPressed(views::Button* sender,
260 const ui::Event& event) { 256 const ui::Event& event) {
261 command_updater_->ExecuteCommand(sender->tag()); 257 command_updater_->ExecuteCommand(sender->tag());
262 } 258 }
263 259
264 content::WebContents* SimpleWebViewDialog::OpenURL( 260 content::WebContents* SimpleWebViewDialog::OpenURL(
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 383
388 void SimpleWebViewDialog::UpdateReload(bool is_loading, bool force) { 384 void SimpleWebViewDialog::UpdateReload(bool is_loading, bool force) {
389 if (reload_) { 385 if (reload_) {
390 reload_->ChangeMode( 386 reload_->ChangeMode(
391 is_loading ? ReloadButton::MODE_STOP : ReloadButton::MODE_RELOAD, 387 is_loading ? ReloadButton::MODE_STOP : ReloadButton::MODE_RELOAD,
392 force); 388 force);
393 } 389 }
394 } 390 }
395 391
396 } // namespace chromeos 392 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698