| 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 823 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 834 IPC_MESSAGE_HANDLER(ViewMsg_ClearFocusedNode, OnClearFocusedNode) | 834 IPC_MESSAGE_HANDLER(ViewMsg_ClearFocusedNode, OnClearFocusedNode) |
| 835 IPC_MESSAGE_HANDLER(ViewMsg_SetBackground, OnSetBackground) | 835 IPC_MESSAGE_HANDLER(ViewMsg_SetBackground, OnSetBackground) |
| 836 IPC_MESSAGE_HANDLER(ViewMsg_EnablePreferredSizeChangedMode, | 836 IPC_MESSAGE_HANDLER(ViewMsg_EnablePreferredSizeChangedMode, |
| 837 OnEnablePreferredSizeChangedMode) | 837 OnEnablePreferredSizeChangedMode) |
| 838 IPC_MESSAGE_HANDLER(ViewMsg_EnableAutoResize, OnEnableAutoResize) | 838 IPC_MESSAGE_HANDLER(ViewMsg_EnableAutoResize, OnEnableAutoResize) |
| 839 IPC_MESSAGE_HANDLER(ViewMsg_DisableAutoResize, OnDisableAutoResize) | 839 IPC_MESSAGE_HANDLER(ViewMsg_DisableAutoResize, OnDisableAutoResize) |
| 840 IPC_MESSAGE_HANDLER(ViewMsg_DisableScrollbarsForSmallWindows, | 840 IPC_MESSAGE_HANDLER(ViewMsg_DisableScrollbarsForSmallWindows, |
| 841 OnDisableScrollbarsForSmallWindows) | 841 OnDisableScrollbarsForSmallWindows) |
| 842 IPC_MESSAGE_HANDLER(ViewMsg_SetRendererPrefs, OnSetRendererPrefs) | 842 IPC_MESSAGE_HANDLER(ViewMsg_SetRendererPrefs, OnSetRendererPrefs) |
| 843 IPC_MESSAGE_HANDLER(ViewMsg_MediaPlayerActionAt, OnMediaPlayerActionAt) | 843 IPC_MESSAGE_HANDLER(ViewMsg_MediaPlayerActionAt, OnMediaPlayerActionAt) |
| 844 IPC_MESSAGE_HANDLER(ViewMsg_OrientationChangeEvent, |
| 845 OnOrientationChangeEvent) |
| 844 IPC_MESSAGE_HANDLER(ViewMsg_PluginActionAt, OnPluginActionAt) | 846 IPC_MESSAGE_HANDLER(ViewMsg_PluginActionAt, OnPluginActionAt) |
| 845 IPC_MESSAGE_HANDLER(ViewMsg_SetActive, OnSetActive) | 847 IPC_MESSAGE_HANDLER(ViewMsg_SetActive, OnSetActive) |
| 846 IPC_MESSAGE_HANDLER(ViewMsg_SetNavigationStartTime, | 848 IPC_MESSAGE_HANDLER(ViewMsg_SetNavigationStartTime, |
| 847 OnSetNavigationStartTime) | 849 OnSetNavigationStartTime) |
| 848 #if defined(OS_MACOSX) | 850 #if defined(OS_MACOSX) |
| 849 IPC_MESSAGE_HANDLER(ViewMsg_SetWindowVisibility, OnSetWindowVisibility) | 851 IPC_MESSAGE_HANDLER(ViewMsg_SetWindowVisibility, OnSetWindowVisibility) |
| 850 IPC_MESSAGE_HANDLER(ViewMsg_WindowFrameChanged, OnWindowFrameChanged) | 852 IPC_MESSAGE_HANDLER(ViewMsg_WindowFrameChanged, OnWindowFrameChanged) |
| 851 IPC_MESSAGE_HANDLER(ViewMsg_PluginImeCompositionCompleted, | 853 IPC_MESSAGE_HANDLER(ViewMsg_PluginImeCompositionCompleted, |
| 852 OnPluginImeCompositionCompleted) | 854 OnPluginImeCompositionCompleted) |
| 853 #endif | 855 #endif |
| (...skipping 3558 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4412 zoomLevelChanged(); | 4414 zoomLevelChanged(); |
| 4413 } | 4415 } |
| 4414 } | 4416 } |
| 4415 | 4417 |
| 4416 void RenderViewImpl::OnMediaPlayerActionAt(const gfx::Point& location, | 4418 void RenderViewImpl::OnMediaPlayerActionAt(const gfx::Point& location, |
| 4417 const WebMediaPlayerAction& action) { | 4419 const WebMediaPlayerAction& action) { |
| 4418 if (webview()) | 4420 if (webview()) |
| 4419 webview()->performMediaPlayerAction(action, location); | 4421 webview()->performMediaPlayerAction(action, location); |
| 4420 } | 4422 } |
| 4421 | 4423 |
| 4424 void RenderViewImpl::OnOrientationChangeEvent(int orientation) { |
| 4425 webview()->mainFrame()->sendOrientationChangeEvent(orientation); |
| 4426 } |
| 4427 |
| 4422 void RenderViewImpl::OnPluginActionAt(const gfx::Point& location, | 4428 void RenderViewImpl::OnPluginActionAt(const gfx::Point& location, |
| 4423 const WebPluginAction& action) { | 4429 const WebPluginAction& action) { |
| 4424 if (webview()) | 4430 if (webview()) |
| 4425 webview()->performPluginAction(action, location); | 4431 webview()->performPluginAction(action, location); |
| 4426 } | 4432 } |
| 4427 | 4433 |
| 4428 void RenderViewImpl::OnGetAllSavableResourceLinksForCurrentPage( | 4434 void RenderViewImpl::OnGetAllSavableResourceLinksForCurrentPage( |
| 4429 const GURL& page_url) { | 4435 const GURL& page_url) { |
| 4430 // Prepare list to storage all savable resource links. | 4436 // Prepare list to storage all savable resource links. |
| 4431 std::vector<GURL> resources_list; | 4437 std::vector<GURL> resources_list; |
| (...skipping 889 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5321 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { | 5327 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { |
| 5322 return !!RenderThreadImpl::current()->compositor_thread(); | 5328 return !!RenderThreadImpl::current()->compositor_thread(); |
| 5323 } | 5329 } |
| 5324 | 5330 |
| 5325 void RenderViewImpl::OnJavaBridgeInit() { | 5331 void RenderViewImpl::OnJavaBridgeInit() { |
| 5326 DCHECK(!java_bridge_dispatcher_); | 5332 DCHECK(!java_bridge_dispatcher_); |
| 5327 #if defined(ENABLE_JAVA_BRIDGE) | 5333 #if defined(ENABLE_JAVA_BRIDGE) |
| 5328 java_bridge_dispatcher_ = new JavaBridgeDispatcher(this); | 5334 java_bridge_dispatcher_ = new JavaBridgeDispatcher(this); |
| 5329 #endif | 5335 #endif |
| 5330 } | 5336 } |
| OLD | NEW |