Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(449)

Side by Side Diff: content/renderer/render_view_impl.cc

Issue 10698046: Implements part of Device Motion in the Renderer (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 #include "content/public/common/url_constants.h" 52 #include "content/public/common/url_constants.h"
53 #include "content/public/renderer/content_renderer_client.h" 53 #include "content/public/renderer/content_renderer_client.h"
54 #include "content/public/renderer/document_state.h" 54 #include "content/public/renderer/document_state.h"
55 #include "content/public/renderer/navigation_state.h" 55 #include "content/public/renderer/navigation_state.h"
56 #include "content/public/renderer/render_view_observer.h" 56 #include "content/public/renderer/render_view_observer.h"
57 #include "content/public/renderer/render_view_visitor.h" 57 #include "content/public/renderer/render_view_visitor.h"
58 #include "content/renderer/browser_plugin/old/browser_plugin.h" 58 #include "content/renderer/browser_plugin/old/browser_plugin.h"
59 #include "content/renderer/browser_plugin/old/browser_plugin_channel_manager.h" 59 #include "content/renderer/browser_plugin/old/browser_plugin_channel_manager.h"
60 #include "content/renderer/browser_plugin/old/browser_plugin_constants.h" 60 #include "content/renderer/browser_plugin/old/browser_plugin_constants.h"
61 #include "content/renderer/browser_plugin/old/guest_to_embedder_channel.h" 61 #include "content/renderer/browser_plugin/old/guest_to_embedder_channel.h"
62 #include "content/renderer/device_motion_dispatcher.h"
62 #include "content/renderer/device_orientation_dispatcher.h" 63 #include "content/renderer/device_orientation_dispatcher.h"
63 #include "content/renderer/devtools_agent.h" 64 #include "content/renderer/devtools_agent.h"
64 #include "content/renderer/dom_automation_controller.h" 65 #include "content/renderer/dom_automation_controller.h"
65 #include "content/renderer/dom_storage/webstoragenamespace_impl.h" 66 #include "content/renderer/dom_storage/webstoragenamespace_impl.h"
66 #include "content/renderer/external_popup_menu.h" 67 #include "content/renderer/external_popup_menu.h"
67 #include "content/renderer/geolocation_dispatcher.h" 68 #include "content/renderer/geolocation_dispatcher.h"
68 #include "content/renderer/gpu/compositor_thread.h" 69 #include "content/renderer/gpu/compositor_thread.h"
69 #include "content/renderer/idle_user_detector.h" 70 #include "content/renderer/idle_user_detector.h"
70 #include "content/renderer/input_tag_speech_dispatcher.h" 71 #include "content/renderer/input_tag_speech_dispatcher.h"
71 #include "content/renderer/java/java_bridge_dispatcher.h" 72 #include "content/renderer/java/java_bridge_dispatcher.h"
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after
522 target_url_status_(TARGET_NONE), 523 target_url_status_(TARGET_NONE),
523 selection_text_offset_(0), 524 selection_text_offset_(0),
524 cached_is_main_frame_pinned_to_left_(false), 525 cached_is_main_frame_pinned_to_left_(false),
525 cached_is_main_frame_pinned_to_right_(false), 526 cached_is_main_frame_pinned_to_right_(false),
526 cached_has_main_frame_horizontal_scrollbar_(false), 527 cached_has_main_frame_horizontal_scrollbar_(false),
527 cached_has_main_frame_vertical_scrollbar_(false), 528 cached_has_main_frame_vertical_scrollbar_(false),
528 ALLOW_THIS_IN_INITIALIZER_LIST(cookie_jar_(this)), 529 ALLOW_THIS_IN_INITIALIZER_LIST(cookie_jar_(this)),
529 geolocation_dispatcher_(NULL), 530 geolocation_dispatcher_(NULL),
530 input_tag_speech_dispatcher_(NULL), 531 input_tag_speech_dispatcher_(NULL),
531 speech_recognition_dispatcher_(NULL), 532 speech_recognition_dispatcher_(NULL),
533 device_motion_dispatcher_(NULL),
532 device_orientation_dispatcher_(NULL), 534 device_orientation_dispatcher_(NULL),
533 media_stream_dispatcher_(NULL), 535 media_stream_dispatcher_(NULL),
534 media_stream_impl_(NULL), 536 media_stream_impl_(NULL),
535 p2p_socket_dispatcher_(NULL), 537 p2p_socket_dispatcher_(NULL),
536 devtools_agent_(NULL), 538 devtools_agent_(NULL),
537 accessibility_mode_(AccessibilityModeOff), 539 accessibility_mode_(AccessibilityModeOff),
538 renderer_accessibility_(NULL), 540 renderer_accessibility_(NULL),
539 java_bridge_dispatcher_(NULL), 541 java_bridge_dispatcher_(NULL),
540 mouse_lock_dispatcher_(NULL), 542 mouse_lock_dispatcher_(NULL),
541 session_storage_namespace_id_(session_storage_namespace_id), 543 session_storage_namespace_id_(session_storage_namespace_id),
(...skipping 4983 matching lines...) Expand 10 before | Expand all | Expand 10 after
5525 } 5527 }
5526 5528
5527 WebKit::WebSpeechRecognizer* RenderViewImpl::speechRecognizer() { 5529 WebKit::WebSpeechRecognizer* RenderViewImpl::speechRecognizer() {
5528 #if defined(ENABLE_INPUT_SPEECH) 5530 #if defined(ENABLE_INPUT_SPEECH)
5529 if (!speech_recognition_dispatcher_) 5531 if (!speech_recognition_dispatcher_)
5530 speech_recognition_dispatcher_ = new SpeechRecognitionDispatcher(this); 5532 speech_recognition_dispatcher_ = new SpeechRecognitionDispatcher(this);
5531 #endif 5533 #endif
5532 return speech_recognition_dispatcher_; 5534 return speech_recognition_dispatcher_;
5533 } 5535 }
5534 5536
5537 WebKit::WebDeviceMotionClient* RenderViewImpl::deviceMotionClient() {
5538 if (!device_motion_dispatcher_)
5539 device_motion_dispatcher_ = new DeviceMotionDispatcher(this);
5540 return device_motion_dispatcher_;
5541 }
5542
5535 WebKit::WebDeviceOrientationClient* RenderViewImpl::deviceOrientationClient() { 5543 WebKit::WebDeviceOrientationClient* RenderViewImpl::deviceOrientationClient() {
5536 if (!device_orientation_dispatcher_) 5544 if (!device_orientation_dispatcher_)
5537 device_orientation_dispatcher_ = new DeviceOrientationDispatcher(this); 5545 device_orientation_dispatcher_ = new DeviceOrientationDispatcher(this);
5538 return device_orientation_dispatcher_; 5546 return device_orientation_dispatcher_;
5539 } 5547 }
5540 5548
5541 void RenderViewImpl::zoomLimitsChanged(double minimum_level, 5549 void RenderViewImpl::zoomLimitsChanged(double minimum_level,
5542 double maximum_level) { 5550 double maximum_level) {
5543 // For now, don't remember plugin zoom values. We don't want to mix them with 5551 // For now, don't remember plugin zoom values. We don't want to mix them with
5544 // normal web content (i.e. a fixed layout plugin would usually want them 5552 // normal web content (i.e. a fixed layout plugin would usually want them
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
5670 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { 5678 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const {
5671 return !!RenderThreadImpl::current()->compositor_thread(); 5679 return !!RenderThreadImpl::current()->compositor_thread();
5672 } 5680 }
5673 5681
5674 void RenderViewImpl::OnJavaBridgeInit() { 5682 void RenderViewImpl::OnJavaBridgeInit() {
5675 DCHECK(!java_bridge_dispatcher_); 5683 DCHECK(!java_bridge_dispatcher_);
5676 #if defined(ENABLE_JAVA_BRIDGE) 5684 #if defined(ENABLE_JAVA_BRIDGE)
5677 java_bridge_dispatcher_ = new JavaBridgeDispatcher(this); 5685 java_bridge_dispatcher_ = new JavaBridgeDispatcher(this);
5678 #endif 5686 #endif
5679 } 5687 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698