| 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 24 matching lines...) Expand all Loading... |
| 35 #include "content/browser/web_contents/web_contents_view.h" | 35 #include "content/browser/web_contents/web_contents_view.h" |
| 36 #include "content/common/features.h" | 36 #include "content/common/features.h" |
| 37 #include "content/common/frame_messages.h" | 37 #include "content/common/frame_messages.h" |
| 38 #include "content/common/input_messages.h" | 38 #include "content/common/input_messages.h" |
| 39 #include "content/common/view_messages.h" | 39 #include "content/common/view_messages.h" |
| 40 #include "content/public/browser/browser_context.h" | 40 #include "content/public/browser/browser_context.h" |
| 41 #include "content/public/browser/browser_thread.h" | 41 #include "content/public/browser/browser_thread.h" |
| 42 #include "content/public/browser/content_browser_client.h" | 42 #include "content/public/browser/content_browser_client.h" |
| 43 #include "content/public/browser/interstitial_page_delegate.h" | 43 #include "content/public/browser/interstitial_page_delegate.h" |
| 44 #include "content/public/browser/invalidate_type.h" | 44 #include "content/public/browser/invalidate_type.h" |
| 45 #include "content/public/browser/keyboard_event_processing_result.h" |
| 45 #include "content/public/browser/notification_service.h" | 46 #include "content/public/browser/notification_service.h" |
| 46 #include "content/public/browser/notification_source.h" | 47 #include "content/public/browser/notification_source.h" |
| 47 #include "content/public/browser/notification_types.h" | 48 #include "content/public/browser/notification_types.h" |
| 48 #include "content/public/browser/storage_partition.h" | 49 #include "content/public/browser/storage_partition.h" |
| 49 #include "content/public/browser/user_metrics.h" | 50 #include "content/public/browser/user_metrics.h" |
| 50 #include "content/public/browser/web_contents_delegate.h" | 51 #include "content/public/browser/web_contents_delegate.h" |
| 51 #include "content/public/common/bindings_policy.h" | 52 #include "content/public/common/bindings_policy.h" |
| 52 #include "net/base/escape.h" | 53 #include "net/base/escape.h" |
| 53 #include "net/url_request/url_request_context_getter.h" | 54 #include "net/url_request/url_request_context_getter.h" |
| 54 #include "ui/base/page_transition_types.h" | 55 #include "ui/base/page_transition_types.h" |
| (...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 541 delegate_->OverrideRendererPrefs(&renderer_preferences_); | 542 delegate_->OverrideRendererPrefs(&renderer_preferences_); |
| 542 return renderer_preferences_; | 543 return renderer_preferences_; |
| 543 } | 544 } |
| 544 | 545 |
| 545 void InterstitialPageImpl::RenderWidgetDeleted( | 546 void InterstitialPageImpl::RenderWidgetDeleted( |
| 546 RenderWidgetHostImpl* render_widget_host) { | 547 RenderWidgetHostImpl* render_widget_host) { |
| 547 // TODO(creis): Remove this method once we verify the shutdown path is sane. | 548 // TODO(creis): Remove this method once we verify the shutdown path is sane. |
| 548 CHECK(!web_contents_); | 549 CHECK(!web_contents_); |
| 549 } | 550 } |
| 550 | 551 |
| 551 bool InterstitialPageImpl::PreHandleKeyboardEvent( | 552 KeyboardEventProcessingResult InterstitialPageImpl::PreHandleKeyboardEvent( |
| 552 const NativeWebKeyboardEvent& event, | 553 const NativeWebKeyboardEvent& event) { |
| 553 bool* is_keyboard_shortcut) { | |
| 554 if (!enabled()) | 554 if (!enabled()) |
| 555 return false; | 555 return KeyboardEventProcessingResult::NOT_HANDLED; |
| 556 return render_widget_host_delegate_->PreHandleKeyboardEvent( | 556 return render_widget_host_delegate_->PreHandleKeyboardEvent(event); |
| 557 event, is_keyboard_shortcut); | |
| 558 } | 557 } |
| 559 | 558 |
| 560 void InterstitialPageImpl::HandleKeyboardEvent( | 559 void InterstitialPageImpl::HandleKeyboardEvent( |
| 561 const NativeWebKeyboardEvent& event) { | 560 const NativeWebKeyboardEvent& event) { |
| 562 if (enabled()) | 561 if (enabled()) |
| 563 render_widget_host_delegate_->HandleKeyboardEvent(event); | 562 render_widget_host_delegate_->HandleKeyboardEvent(event); |
| 564 } | 563 } |
| 565 | 564 |
| 566 WebContents* InterstitialPageImpl::web_contents() const { | 565 WebContents* InterstitialPageImpl::web_contents() const { |
| 567 return web_contents_; | 566 return web_contents_; |
| (...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 972 void InterstitialPageImpl::UpdateDeviceScaleFactor(double device_scale_factor) { | 971 void InterstitialPageImpl::UpdateDeviceScaleFactor(double device_scale_factor) { |
| 973 WebContentsImpl* web_contents_impl = | 972 WebContentsImpl* web_contents_impl = |
| 974 static_cast<WebContentsImpl*>(web_contents_); | 973 static_cast<WebContentsImpl*>(web_contents_); |
| 975 if (!web_contents_impl) | 974 if (!web_contents_impl) |
| 976 return; | 975 return; |
| 977 | 976 |
| 978 web_contents_impl->UpdateDeviceScaleFactor(device_scale_factor); | 977 web_contents_impl->UpdateDeviceScaleFactor(device_scale_factor); |
| 979 } | 978 } |
| 980 | 979 |
| 981 } // namespace content | 980 } // namespace content |
| OLD | NEW |