OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/renderer/render_view_impl.h" | 5 #include "content/renderer/render_view_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <cmath> | 8 #include <cmath> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 #include "content/public/renderer/document_state.h" | 55 #include "content/public/renderer/document_state.h" |
56 #include "content/public/renderer/navigation_state.h" | 56 #include "content/public/renderer/navigation_state.h" |
57 #include "content/public/renderer/render_view_observer.h" | 57 #include "content/public/renderer/render_view_observer.h" |
58 #include "content/public/renderer/render_view_visitor.h" | 58 #include "content/public/renderer/render_view_visitor.h" |
59 #include "content/renderer/browser_plugin/browser_plugin.h" | 59 #include "content/renderer/browser_plugin/browser_plugin.h" |
60 #include "content/renderer/browser_plugin/browser_plugin_manager.h" | 60 #include "content/renderer/browser_plugin/browser_plugin_manager.h" |
61 #include "content/renderer/browser_plugin/old/old_browser_plugin.h" | 61 #include "content/renderer/browser_plugin/old/old_browser_plugin.h" |
62 #include "content/renderer/browser_plugin/old/browser_plugin_channel_manager.h" | 62 #include "content/renderer/browser_plugin/old/browser_plugin_channel_manager.h" |
63 #include "content/renderer/browser_plugin/old/browser_plugin_constants.h" | 63 #include "content/renderer/browser_plugin/old/browser_plugin_constants.h" |
64 #include "content/renderer/browser_plugin/old/guest_to_embedder_channel.h" | 64 #include "content/renderer/browser_plugin/old/guest_to_embedder_channel.h" |
| 65 #include "content/renderer/device_motion_dispatcher.h" |
65 #include "content/renderer/device_orientation_dispatcher.h" | 66 #include "content/renderer/device_orientation_dispatcher.h" |
66 #include "content/renderer/devtools_agent.h" | 67 #include "content/renderer/devtools_agent.h" |
67 #include "content/renderer/dom_automation_controller.h" | 68 #include "content/renderer/dom_automation_controller.h" |
68 #include "content/renderer/dom_storage/webstoragenamespace_impl.h" | 69 #include "content/renderer/dom_storage/webstoragenamespace_impl.h" |
69 #include "content/renderer/external_popup_menu.h" | 70 #include "content/renderer/external_popup_menu.h" |
70 #include "content/renderer/geolocation_dispatcher.h" | 71 #include "content/renderer/geolocation_dispatcher.h" |
71 #include "content/renderer/gpu/compositor_thread.h" | 72 #include "content/renderer/gpu/compositor_thread.h" |
72 #include "content/renderer/gpu/compositor_output_surface.h" | 73 #include "content/renderer/gpu/compositor_output_surface.h" |
73 #include "content/renderer/idle_user_detector.h" | 74 #include "content/renderer/idle_user_detector.h" |
74 #include "content/renderer/input_tag_speech_dispatcher.h" | 75 #include "content/renderer/input_tag_speech_dispatcher.h" |
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
534 target_url_status_(TARGET_NONE), | 535 target_url_status_(TARGET_NONE), |
535 selection_text_offset_(0), | 536 selection_text_offset_(0), |
536 cached_is_main_frame_pinned_to_left_(false), | 537 cached_is_main_frame_pinned_to_left_(false), |
537 cached_is_main_frame_pinned_to_right_(false), | 538 cached_is_main_frame_pinned_to_right_(false), |
538 cached_has_main_frame_horizontal_scrollbar_(false), | 539 cached_has_main_frame_horizontal_scrollbar_(false), |
539 cached_has_main_frame_vertical_scrollbar_(false), | 540 cached_has_main_frame_vertical_scrollbar_(false), |
540 ALLOW_THIS_IN_INITIALIZER_LIST(cookie_jar_(this)), | 541 ALLOW_THIS_IN_INITIALIZER_LIST(cookie_jar_(this)), |
541 geolocation_dispatcher_(NULL), | 542 geolocation_dispatcher_(NULL), |
542 input_tag_speech_dispatcher_(NULL), | 543 input_tag_speech_dispatcher_(NULL), |
543 speech_recognition_dispatcher_(NULL), | 544 speech_recognition_dispatcher_(NULL), |
| 545 device_motion_dispatcher_(NULL), |
544 device_orientation_dispatcher_(NULL), | 546 device_orientation_dispatcher_(NULL), |
545 media_stream_dispatcher_(NULL), | 547 media_stream_dispatcher_(NULL), |
546 media_stream_impl_(NULL), | 548 media_stream_impl_(NULL), |
547 p2p_socket_dispatcher_(NULL), | 549 p2p_socket_dispatcher_(NULL), |
548 devtools_agent_(NULL), | 550 devtools_agent_(NULL), |
549 accessibility_mode_(AccessibilityModeOff), | 551 accessibility_mode_(AccessibilityModeOff), |
550 renderer_accessibility_(NULL), | 552 renderer_accessibility_(NULL), |
551 java_bridge_dispatcher_(NULL), | 553 java_bridge_dispatcher_(NULL), |
552 mouse_lock_dispatcher_(NULL), | 554 mouse_lock_dispatcher_(NULL), |
553 session_storage_namespace_id_(session_storage_namespace_id), | 555 session_storage_namespace_id_(session_storage_namespace_id), |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
752 session_storage_namespace_id, | 754 session_storage_namespace_id, |
753 frame_name, | 755 frame_name, |
754 is_renderer_created, | 756 is_renderer_created, |
755 swapped_out, | 757 swapped_out, |
756 next_page_id, | 758 next_page_id, |
757 screen_info, | 759 screen_info, |
758 guest_to_embedder_channel, | 760 guest_to_embedder_channel, |
759 accessibility_mode); | 761 accessibility_mode); |
760 } | 762 } |
761 | 763 |
| 764 WebKit::WebDeviceMotionDetector* RenderViewImpl::GetDeviceMotionDispatcher() { |
| 765 if (!device_motion_dispatcher_) |
| 766 device_motion_dispatcher_ = new DeviceMotionDispatcher(this); |
| 767 return device_motion_dispatcher_; |
| 768 } |
| 769 |
762 WebPeerConnection00Handler* RenderViewImpl::CreatePeerConnectionHandlerJsep( | 770 WebPeerConnection00Handler* RenderViewImpl::CreatePeerConnectionHandlerJsep( |
763 WebPeerConnection00HandlerClient* client) { | 771 WebPeerConnection00HandlerClient* client) { |
764 EnsureMediaStreamImpl(); | 772 EnsureMediaStreamImpl(); |
765 if (!media_stream_impl_) | 773 if (!media_stream_impl_) |
766 return NULL; | 774 return NULL; |
767 return media_stream_impl_->CreatePeerConnectionHandlerJsep(client); | 775 return media_stream_impl_->CreatePeerConnectionHandlerJsep(client); |
768 } | 776 } |
769 | 777 |
770 void RenderViewImpl::AddObserver(RenderViewObserver* observer) { | 778 void RenderViewImpl::AddObserver(RenderViewObserver* observer) { |
771 observers_.AddObserver(observer); | 779 observers_.AddObserver(observer); |
(...skipping 5026 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5798 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { | 5806 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { |
5799 return !!RenderThreadImpl::current()->compositor_thread(); | 5807 return !!RenderThreadImpl::current()->compositor_thread(); |
5800 } | 5808 } |
5801 | 5809 |
5802 void RenderViewImpl::OnJavaBridgeInit() { | 5810 void RenderViewImpl::OnJavaBridgeInit() { |
5803 DCHECK(!java_bridge_dispatcher_); | 5811 DCHECK(!java_bridge_dispatcher_); |
5804 #if defined(ENABLE_JAVA_BRIDGE) | 5812 #if defined(ENABLE_JAVA_BRIDGE) |
5805 java_bridge_dispatcher_ = new JavaBridgeDispatcher(this); | 5813 java_bridge_dispatcher_ = new JavaBridgeDispatcher(this); |
5806 #endif | 5814 #endif |
5807 } | 5815 } |
OLD | NEW |