OLD | NEW |
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/shell.h" | 7 #include "ash/shell.h" |
8 #include "ash/shell_window_ids.h" | 8 #include "ash/shell_window_ids.h" |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
318 // Notreached because SimpleWebViewDialog uses a popup-mode LocationBarView, | 318 // Notreached because SimpleWebViewDialog uses a popup-mode LocationBarView, |
319 // and it doesn't create PageActionImageViews. | 319 // and it doesn't create PageActionImageViews. |
320 NOTREACHED(); | 320 NOTREACHED(); |
321 return NULL; | 321 return NULL; |
322 } | 322 } |
323 | 323 |
324 content::WebContents* SimpleWebViewDialog::GetActiveWebContents() const { | 324 content::WebContents* SimpleWebViewDialog::GetActiveWebContents() const { |
325 return web_view_->web_contents(); | 325 return web_view_->web_contents(); |
326 } | 326 } |
327 | 327 |
328 bool SimpleWebViewDialog::InTabbedBrowser() const { | |
329 return false; | |
330 } | |
331 | |
332 void SimpleWebViewDialog::ExecuteCommandWithDisposition( | 328 void SimpleWebViewDialog::ExecuteCommandWithDisposition( |
333 int id, | 329 int id, |
334 WindowOpenDisposition) { | 330 WindowOpenDisposition) { |
335 WebContents* web_contents = web_view_->web_contents(); | 331 WebContents* web_contents = web_view_->web_contents(); |
336 switch (id) { | 332 switch (id) { |
337 case IDC_BACK: | 333 case IDC_BACK: |
338 if (web_contents->GetController().CanGoBack()) { | 334 if (web_contents->GetController().CanGoBack()) { |
339 location_bar_->Revert(); | 335 location_bar_->Revert(); |
340 web_contents->GetController().GoBack(); | 336 web_contents->GetController().GoBack(); |
341 } | 337 } |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
394 | 390 |
395 void SimpleWebViewDialog::UpdateReload(bool is_loading, bool force) { | 391 void SimpleWebViewDialog::UpdateReload(bool is_loading, bool force) { |
396 if (reload_) { | 392 if (reload_) { |
397 reload_->ChangeMode( | 393 reload_->ChangeMode( |
398 is_loading ? ReloadButton::MODE_STOP : ReloadButton::MODE_RELOAD, | 394 is_loading ? ReloadButton::MODE_STOP : ReloadButton::MODE_RELOAD, |
399 force); | 395 force); |
400 } | 396 } |
401 } | 397 } |
402 | 398 |
403 } // namespace chromeos | 399 } // namespace chromeos |
OLD | NEW |