| 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 <utility> | 7 #include <utility> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 545 return render_widget_host_delegate_->PreHandleKeyboardEvent( | 545 return render_widget_host_delegate_->PreHandleKeyboardEvent( |
| 546 event, is_keyboard_shortcut); | 546 event, is_keyboard_shortcut); |
| 547 } | 547 } |
| 548 | 548 |
| 549 void InterstitialPageImpl::HandleKeyboardEvent( | 549 void InterstitialPageImpl::HandleKeyboardEvent( |
| 550 const NativeWebKeyboardEvent& event) { | 550 const NativeWebKeyboardEvent& event) { |
| 551 if (enabled()) | 551 if (enabled()) |
| 552 render_widget_host_delegate_->HandleKeyboardEvent(event); | 552 render_widget_host_delegate_->HandleKeyboardEvent(event); |
| 553 } | 553 } |
| 554 | 554 |
| 555 #if defined(OS_WIN) | |
| 556 gfx::NativeViewAccessible | |
| 557 InterstitialPageImpl::GetParentNativeViewAccessible() { | |
| 558 if (web_contents_) { | |
| 559 WebContentsImpl* wci = static_cast<WebContentsImpl*>(web_contents_); | |
| 560 return wci->GetParentNativeViewAccessible(); | |
| 561 } | |
| 562 return NULL; | |
| 563 } | |
| 564 #endif | |
| 565 | |
| 566 WebContents* InterstitialPageImpl::web_contents() const { | 555 WebContents* InterstitialPageImpl::web_contents() const { |
| 567 return web_contents_; | 556 return web_contents_; |
| 568 } | 557 } |
| 569 | 558 |
| 570 RenderViewHostImpl* InterstitialPageImpl::CreateRenderViewHost() { | 559 RenderViewHostImpl* InterstitialPageImpl::CreateRenderViewHost() { |
| 571 if (!enabled()) | 560 if (!enabled()) |
| 572 return NULL; | 561 return NULL; |
| 573 | 562 |
| 574 // Interstitial pages don't want to share the session storage so we mint a | 563 // Interstitial pages don't want to share the session storage so we mint a |
| 575 // new one. | 564 // new one. |
| (...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 935 void InterstitialPageImpl::UnderlyingContentObserver::NavigationEntryCommitted( | 924 void InterstitialPageImpl::UnderlyingContentObserver::NavigationEntryCommitted( |
| 936 const LoadCommittedDetails& load_details) { | 925 const LoadCommittedDetails& load_details) { |
| 937 interstitial_->OnNavigatingAwayOrTabClosing(); | 926 interstitial_->OnNavigatingAwayOrTabClosing(); |
| 938 } | 927 } |
| 939 | 928 |
| 940 void InterstitialPageImpl::UnderlyingContentObserver::WebContentsDestroyed() { | 929 void InterstitialPageImpl::UnderlyingContentObserver::WebContentsDestroyed() { |
| 941 interstitial_->OnNavigatingAwayOrTabClosing(); | 930 interstitial_->OnNavigatingAwayOrTabClosing(); |
| 942 } | 931 } |
| 943 | 932 |
| 944 } // namespace content | 933 } // namespace content |
| OLD | NEW |