| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "content/browser/frame_host/interstitial_page_impl.h" | 5 #include "content/browser/frame_host/interstitial_page_impl.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 425 if (!new_navigation_ && !should_revert_web_contents_title_) { | 425 if (!new_navigation_ && !should_revert_web_contents_title_) { |
| 426 original_web_contents_title_ = entry->GetTitle(); | 426 original_web_contents_title_ = entry->GetTitle(); |
| 427 should_revert_web_contents_title_ = true; | 427 should_revert_web_contents_title_ = true; |
| 428 } | 428 } |
| 429 // TODO(evan): make use of title_direction. | 429 // TODO(evan): make use of title_direction. |
| 430 // http://code.google.com/p/chromium/issues/detail?id=27094 | 430 // http://code.google.com/p/chromium/issues/detail?id=27094 |
| 431 entry->SetTitle(title); | 431 entry->SetTitle(title); |
| 432 controller_->delegate()->NotifyNavigationStateChanged(INVALIDATE_TYPE_TITLE); | 432 controller_->delegate()->NotifyNavigationStateChanged(INVALIDATE_TYPE_TITLE); |
| 433 } | 433 } |
| 434 | 434 |
| 435 AccessibilityMode InterstitialPageImpl::GetAccessibilityMode() const { | |
| 436 if (web_contents_) | |
| 437 return static_cast<WebContentsImpl*>(web_contents_)->GetAccessibilityMode(); | |
| 438 else | |
| 439 return AccessibilityModeOff; | |
| 440 } | |
| 441 | |
| 442 RenderViewHostDelegateView* InterstitialPageImpl::GetDelegateView() { | 435 RenderViewHostDelegateView* InterstitialPageImpl::GetDelegateView() { |
| 443 return rvh_delegate_view_.get(); | 436 return rvh_delegate_view_.get(); |
| 444 } | 437 } |
| 445 | 438 |
| 446 const GURL& InterstitialPageImpl::GetMainFrameLastCommittedURL() const { | 439 const GURL& InterstitialPageImpl::GetMainFrameLastCommittedURL() const { |
| 447 return url_; | 440 return url_; |
| 448 } | 441 } |
| 449 | 442 |
| 450 void InterstitialPageImpl::RenderViewTerminated( | 443 void InterstitialPageImpl::RenderViewTerminated( |
| 451 RenderViewHost* render_view_host, | 444 RenderViewHost* render_view_host, |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 533 | 526 |
| 534 void InterstitialPageImpl::HandleKeyboardEvent( | 527 void InterstitialPageImpl::HandleKeyboardEvent( |
| 535 const NativeWebKeyboardEvent& event) { | 528 const NativeWebKeyboardEvent& event) { |
| 536 if (enabled()) | 529 if (enabled()) |
| 537 render_widget_host_delegate_->HandleKeyboardEvent(event); | 530 render_widget_host_delegate_->HandleKeyboardEvent(event); |
| 538 } | 531 } |
| 539 | 532 |
| 540 #if defined(OS_WIN) | 533 #if defined(OS_WIN) |
| 541 gfx::NativeViewAccessible | 534 gfx::NativeViewAccessible |
| 542 InterstitialPageImpl::GetParentNativeViewAccessible() { | 535 InterstitialPageImpl::GetParentNativeViewAccessible() { |
| 543 if (web_contents_) { | 536 return render_widget_host_delegate_->GetParentNativeViewAccessible(); |
| 544 WebContentsImpl* wci = static_cast<WebContentsImpl*>(web_contents_); | |
| 545 return wci->GetParentNativeViewAccessible(); | |
| 546 } | |
| 547 return NULL; | |
| 548 } | 537 } |
| 549 #endif | 538 #endif |
| 550 | 539 |
| 551 WebContents* InterstitialPageImpl::web_contents() const { | 540 WebContents* InterstitialPageImpl::web_contents() const { |
| 552 return web_contents_; | 541 return web_contents_; |
| 553 } | 542 } |
| 554 | 543 |
| 555 RenderViewHost* InterstitialPageImpl::CreateRenderViewHost() { | 544 RenderViewHost* InterstitialPageImpl::CreateRenderViewHost() { |
| 556 if (!enabled()) | 545 if (!enabled()) |
| 557 return NULL; | 546 return NULL; |
| (...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 910 | 899 |
| 911 web_contents->GetDelegateView()->TakeFocus(reverse); | 900 web_contents->GetDelegateView()->TakeFocus(reverse); |
| 912 } | 901 } |
| 913 | 902 |
| 914 void InterstitialPageImpl::InterstitialPageRVHDelegateView::OnFindReply( | 903 void InterstitialPageImpl::InterstitialPageRVHDelegateView::OnFindReply( |
| 915 int request_id, int number_of_matches, const gfx::Rect& selection_rect, | 904 int request_id, int number_of_matches, const gfx::Rect& selection_rect, |
| 916 int active_match_ordinal, bool final_update) { | 905 int active_match_ordinal, bool final_update) { |
| 917 } | 906 } |
| 918 | 907 |
| 919 } // namespace content | 908 } // namespace content |
| OLD | NEW |