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 |
435 RenderViewHostDelegateView* InterstitialPageImpl::GetDelegateView() { | 442 RenderViewHostDelegateView* InterstitialPageImpl::GetDelegateView() { |
436 return rvh_delegate_view_.get(); | 443 return rvh_delegate_view_.get(); |
437 } | 444 } |
438 | 445 |
439 const GURL& InterstitialPageImpl::GetMainFrameLastCommittedURL() const { | 446 const GURL& InterstitialPageImpl::GetMainFrameLastCommittedURL() const { |
440 return url_; | 447 return url_; |
441 } | 448 } |
442 | 449 |
443 void InterstitialPageImpl::RenderViewTerminated( | 450 void InterstitialPageImpl::RenderViewTerminated( |
444 RenderViewHost* render_view_host, | 451 RenderViewHost* render_view_host, |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
526 | 533 |
527 void InterstitialPageImpl::HandleKeyboardEvent( | 534 void InterstitialPageImpl::HandleKeyboardEvent( |
528 const NativeWebKeyboardEvent& event) { | 535 const NativeWebKeyboardEvent& event) { |
529 if (enabled()) | 536 if (enabled()) |
530 render_widget_host_delegate_->HandleKeyboardEvent(event); | 537 render_widget_host_delegate_->HandleKeyboardEvent(event); |
531 } | 538 } |
532 | 539 |
533 #if defined(OS_WIN) | 540 #if defined(OS_WIN) |
534 gfx::NativeViewAccessible | 541 gfx::NativeViewAccessible |
535 InterstitialPageImpl::GetParentNativeViewAccessible() { | 542 InterstitialPageImpl::GetParentNativeViewAccessible() { |
536 return render_widget_host_delegate_->GetParentNativeViewAccessible(); | 543 if (web_contents_) { |
| 544 WebContentsImpl* wci = static_cast<WebContentsImpl*>(web_contents_); |
| 545 return wci->GetParentNativeViewAccessible(); |
| 546 } |
| 547 return NULL; |
537 } | 548 } |
538 #endif | 549 #endif |
539 | 550 |
540 WebContents* InterstitialPageImpl::web_contents() const { | 551 WebContents* InterstitialPageImpl::web_contents() const { |
541 return web_contents_; | 552 return web_contents_; |
542 } | 553 } |
543 | 554 |
544 RenderViewHost* InterstitialPageImpl::CreateRenderViewHost() { | 555 RenderViewHost* InterstitialPageImpl::CreateRenderViewHost() { |
545 if (!enabled()) | 556 if (!enabled()) |
546 return NULL; | 557 return NULL; |
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
899 | 910 |
900 web_contents->GetDelegateView()->TakeFocus(reverse); | 911 web_contents->GetDelegateView()->TakeFocus(reverse); |
901 } | 912 } |
902 | 913 |
903 void InterstitialPageImpl::InterstitialPageRVHDelegateView::OnFindReply( | 914 void InterstitialPageImpl::InterstitialPageRVHDelegateView::OnFindReply( |
904 int request_id, int number_of_matches, const gfx::Rect& selection_rect, | 915 int request_id, int number_of_matches, const gfx::Rect& selection_rect, |
905 int active_match_ordinal, bool final_update) { | 916 int active_match_ordinal, bool final_update) { |
906 } | 917 } |
907 | 918 |
908 } // namespace content | 919 } // namespace content |
OLD | NEW |