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 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 using WebKit::WebGraphicsContext3D; | 219 using WebKit::WebGraphicsContext3D; |
220 using WebKit::WebHistoryItem; | 220 using WebKit::WebHistoryItem; |
221 using WebKit::WebIconURL; | 221 using WebKit::WebIconURL; |
222 using WebKit::WebImage; | 222 using WebKit::WebImage; |
223 using WebKit::WebInputElement; | 223 using WebKit::WebInputElement; |
224 using WebKit::WebIntentRequest; | 224 using WebKit::WebIntentRequest; |
225 using WebKit::WebIntentServiceInfo; | 225 using WebKit::WebIntentServiceInfo; |
226 using WebKit::WebMediaPlayer; | 226 using WebKit::WebMediaPlayer; |
227 using WebKit::WebMediaPlayerAction; | 227 using WebKit::WebMediaPlayerAction; |
228 using WebKit::WebMediaPlayerClient; | 228 using WebKit::WebMediaPlayerClient; |
| 229 using WebKit::WebMouseEvent; |
| 230 using WebKit::WebMouseWheelEvent; |
229 using WebKit::WebNavigationPolicy; | 231 using WebKit::WebNavigationPolicy; |
230 using WebKit::WebNavigationType; | 232 using WebKit::WebNavigationType; |
231 using WebKit::WebNode; | 233 using WebKit::WebNode; |
232 using WebKit::WebPageSerializer; | 234 using WebKit::WebPageSerializer; |
233 using WebKit::WebPageSerializerClient; | 235 using WebKit::WebPageSerializerClient; |
234 using WebKit::WebPeerConnection00Handler; | 236 using WebKit::WebPeerConnection00Handler; |
235 using WebKit::WebPeerConnection00HandlerClient; | 237 using WebKit::WebPeerConnection00HandlerClient; |
236 using WebKit::WebPeerConnectionHandler; | 238 using WebKit::WebPeerConnectionHandler; |
237 using WebKit::WebPeerConnectionHandlerClient; | 239 using WebKit::WebPeerConnectionHandlerClient; |
238 using WebKit::WebPlugin; | 240 using WebKit::WebPlugin; |
(...skipping 4501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4740 } | 4742 } |
4741 | 4743 |
4742 bool RenderViewImpl::WillHandleMouseEvent(const WebKit::WebMouseEvent& event) { | 4744 bool RenderViewImpl::WillHandleMouseEvent(const WebKit::WebMouseEvent& event) { |
4743 pepper_delegate_.WillHandleMouseEvent(); | 4745 pepper_delegate_.WillHandleMouseEvent(); |
4744 | 4746 |
4745 // If the mouse is locked, only the current owner of the mouse lock can | 4747 // If the mouse is locked, only the current owner of the mouse lock can |
4746 // process mouse events. | 4748 // process mouse events. |
4747 return mouse_lock_dispatcher_->WillHandleMouseEvent(event); | 4749 return mouse_lock_dispatcher_->WillHandleMouseEvent(event); |
4748 } | 4750 } |
4749 | 4751 |
4750 void RenderViewImpl::DidHandleMouseEvent(const WebKit::WebMouseEvent& event) { | 4752 void RenderViewImpl::DidHandleMouseEvent(const WebMouseEvent& event) { |
4751 FOR_EACH_OBSERVER(RenderViewObserver, observers_, DidHandleMouseEvent(event)); | 4753 FOR_EACH_OBSERVER(RenderViewObserver, observers_, DidHandleMouseEvent(event)); |
4752 } | 4754 } |
4753 | 4755 |
4754 void RenderViewImpl::DidHandleTouchEvent(const WebTouchEvent& event) { | 4756 void RenderViewImpl::DidHandleTouchEvent(const WebTouchEvent& event) { |
4755 FOR_EACH_OBSERVER(RenderViewObserver, observers_, DidHandleTouchEvent(event)); | 4757 FOR_EACH_OBSERVER(RenderViewObserver, observers_, DidHandleTouchEvent(event)); |
4756 } | 4758 } |
4757 | 4759 |
| 4760 void RenderViewImpl::DidHandleWheelEvent(const WebMouseWheelEvent& event) { |
| 4761 FOR_EACH_OBSERVER(RenderViewObserver, observers_, DidHandleWheelEvent(event)); |
| 4762 } |
| 4763 |
4758 void RenderViewImpl::OnWasHidden() { | 4764 void RenderViewImpl::OnWasHidden() { |
4759 RenderWidget::OnWasHidden(); | 4765 RenderWidget::OnWasHidden(); |
4760 | 4766 |
4761 if (webview()) { | 4767 if (webview()) { |
4762 webview()->settings()->setMinimumTimerInterval( | 4768 webview()->settings()->setMinimumTimerInterval( |
4763 webkit_glue::kBackgroundTabTimerInterval); | 4769 webkit_glue::kBackgroundTabTimerInterval); |
4764 webview()->setVisibilityState(visibilityState(), false); | 4770 webview()->setVisibilityState(visibilityState(), false); |
4765 } | 4771 } |
4766 | 4772 |
4767 // Inform PPAPI plugins that their page is no longer visible. | 4773 // Inform PPAPI plugins that their page is no longer visible. |
(...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5250 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { | 5256 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { |
5251 return !!RenderThreadImpl::current()->compositor_thread(); | 5257 return !!RenderThreadImpl::current()->compositor_thread(); |
5252 } | 5258 } |
5253 | 5259 |
5254 void RenderViewImpl::OnJavaBridgeInit() { | 5260 void RenderViewImpl::OnJavaBridgeInit() { |
5255 DCHECK(!java_bridge_dispatcher_.get()); | 5261 DCHECK(!java_bridge_dispatcher_.get()); |
5256 #if defined(ENABLE_JAVA_BRIDGE) | 5262 #if defined(ENABLE_JAVA_BRIDGE) |
5257 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this)); | 5263 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this)); |
5258 #endif | 5264 #endif |
5259 } | 5265 } |
OLD | NEW |