OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/tab_contents/interstitial_page.h" | 5 #include "chrome/browser/tab_contents/interstitial_page.h" |
6 | 6 |
7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
10 #include "base/thread.h" | 10 #include "base/thread.h" |
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
450 // discard the pending entry, which is what we want, since the navigation is | 450 // discard the pending entry, which is what we want, since the navigation is |
451 // cancelled. | 451 // cancelled. |
452 tab_->controller().DiscardNonCommittedEntries(); | 452 tab_->controller().DiscardNonCommittedEntries(); |
453 } | 453 } |
454 | 454 |
455 Hide(); | 455 Hide(); |
456 // WARNING: we are now deleted! | 456 // WARNING: we are now deleted! |
457 } | 457 } |
458 | 458 |
459 void InterstitialPage::SetSize(const gfx::Size& size) { | 459 void InterstitialPage::SetSize(const gfx::Size& size) { |
460 #if defined(OS_WIN) | 460 #if defined(OS_WIN) || defined(OS_LINUX) |
461 // When a tab is closed, we might be resized after our view was NULLed | 461 // When a tab is closed, we might be resized after our view was NULLed |
462 // (typically if there was an info-bar). | 462 // (typically if there was an info-bar). |
463 if (render_view_host_->view()) | 463 if (render_view_host_->view()) |
464 render_view_host_->view()->SetSize(size); | 464 render_view_host_->view()->SetSize(size); |
465 #else | 465 #else |
466 // TODO(port): do Mac or Linux need to SetSize? | 466 // TODO(port): Does Mac need to SetSize? |
467 NOTIMPLEMENTED(); | 467 NOTIMPLEMENTED(); |
468 #endif | 468 #endif |
469 } | 469 } |
470 | 470 |
471 void InterstitialPage::Focus() { | 471 void InterstitialPage::Focus() { |
472 // Focus the native window. | 472 // Focus the native window. |
473 render_view_host_->view()->Focus(); | 473 render_view_host_->view()->Focus(); |
474 } | 474 } |
475 | 475 |
476 void InterstitialPage::FocusThroughTabTraversal(bool reverse) { | 476 void InterstitialPage::FocusThroughTabTraversal(bool reverse) { |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
603 } | 603 } |
604 | 604 |
605 void InterstitialPage::InterstitialPageRVHViewDelegate::OnFindReply( | 605 void InterstitialPage::InterstitialPageRVHViewDelegate::OnFindReply( |
606 int request_id, int number_of_matches, const gfx::Rect& selection_rect, | 606 int request_id, int number_of_matches, const gfx::Rect& selection_rect, |
607 int active_match_ordinal, bool final_update) { | 607 int active_match_ordinal, bool final_update) { |
608 } | 608 } |
609 | 609 |
610 int InterstitialPage::GetBrowserWindowID() const { | 610 int InterstitialPage::GetBrowserWindowID() const { |
611 return tab_->GetBrowserWindowID(); | 611 return tab_->GetBrowserWindowID(); |
612 } | 612 } |
OLD | NEW |