| 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 821 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 832 IPC_MESSAGE_HANDLER(ViewMsg_ClearFocusedNode, OnClearFocusedNode) | 832 IPC_MESSAGE_HANDLER(ViewMsg_ClearFocusedNode, OnClearFocusedNode) |
| 833 IPC_MESSAGE_HANDLER(ViewMsg_SetBackground, OnSetBackground) | 833 IPC_MESSAGE_HANDLER(ViewMsg_SetBackground, OnSetBackground) |
| 834 IPC_MESSAGE_HANDLER(ViewMsg_EnablePreferredSizeChangedMode, | 834 IPC_MESSAGE_HANDLER(ViewMsg_EnablePreferredSizeChangedMode, |
| 835 OnEnablePreferredSizeChangedMode) | 835 OnEnablePreferredSizeChangedMode) |
| 836 IPC_MESSAGE_HANDLER(ViewMsg_EnableAutoResize, OnEnableAutoResize) | 836 IPC_MESSAGE_HANDLER(ViewMsg_EnableAutoResize, OnEnableAutoResize) |
| 837 IPC_MESSAGE_HANDLER(ViewMsg_DisableAutoResize, OnDisableAutoResize) | 837 IPC_MESSAGE_HANDLER(ViewMsg_DisableAutoResize, OnDisableAutoResize) |
| 838 IPC_MESSAGE_HANDLER(ViewMsg_DisableScrollbarsForSmallWindows, | 838 IPC_MESSAGE_HANDLER(ViewMsg_DisableScrollbarsForSmallWindows, |
| 839 OnDisableScrollbarsForSmallWindows) | 839 OnDisableScrollbarsForSmallWindows) |
| 840 IPC_MESSAGE_HANDLER(ViewMsg_SetRendererPrefs, OnSetRendererPrefs) | 840 IPC_MESSAGE_HANDLER(ViewMsg_SetRendererPrefs, OnSetRendererPrefs) |
| 841 IPC_MESSAGE_HANDLER(ViewMsg_MediaPlayerActionAt, OnMediaPlayerActionAt) | 841 IPC_MESSAGE_HANDLER(ViewMsg_MediaPlayerActionAt, OnMediaPlayerActionAt) |
| 842 IPC_MESSAGE_HANDLER(ViewMsg_OrientationChangeEvent, |
| 843 OnOrientationChangeEvent) |
| 842 IPC_MESSAGE_HANDLER(ViewMsg_PluginActionAt, OnPluginActionAt) | 844 IPC_MESSAGE_HANDLER(ViewMsg_PluginActionAt, OnPluginActionAt) |
| 843 IPC_MESSAGE_HANDLER(ViewMsg_SetActive, OnSetActive) | 845 IPC_MESSAGE_HANDLER(ViewMsg_SetActive, OnSetActive) |
| 844 IPC_MESSAGE_HANDLER(ViewMsg_SetNavigationStartTime, | 846 IPC_MESSAGE_HANDLER(ViewMsg_SetNavigationStartTime, |
| 845 OnSetNavigationStartTime) | 847 OnSetNavigationStartTime) |
| 846 #if defined(OS_MACOSX) | 848 #if defined(OS_MACOSX) |
| 847 IPC_MESSAGE_HANDLER(ViewMsg_SetWindowVisibility, OnSetWindowVisibility) | 849 IPC_MESSAGE_HANDLER(ViewMsg_SetWindowVisibility, OnSetWindowVisibility) |
| 848 IPC_MESSAGE_HANDLER(ViewMsg_WindowFrameChanged, OnWindowFrameChanged) | 850 IPC_MESSAGE_HANDLER(ViewMsg_WindowFrameChanged, OnWindowFrameChanged) |
| 849 IPC_MESSAGE_HANDLER(ViewMsg_PluginImeCompositionCompleted, | 851 IPC_MESSAGE_HANDLER(ViewMsg_PluginImeCompositionCompleted, |
| 850 OnPluginImeCompositionCompleted) | 852 OnPluginImeCompositionCompleted) |
| 851 #endif | 853 #endif |
| (...skipping 3552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4404 zoomLevelChanged(); | 4406 zoomLevelChanged(); |
| 4405 } | 4407 } |
| 4406 } | 4408 } |
| 4407 | 4409 |
| 4408 void RenderViewImpl::OnMediaPlayerActionAt(const gfx::Point& location, | 4410 void RenderViewImpl::OnMediaPlayerActionAt(const gfx::Point& location, |
| 4409 const WebMediaPlayerAction& action) { | 4411 const WebMediaPlayerAction& action) { |
| 4410 if (webview()) | 4412 if (webview()) |
| 4411 webview()->performMediaPlayerAction(action, location); | 4413 webview()->performMediaPlayerAction(action, location); |
| 4412 } | 4414 } |
| 4413 | 4415 |
| 4416 void RenderViewImpl::OnOrientationChangeEvent(int orientation) { |
| 4417 webview()->mainFrame()->sendOrientationChangeEvent(orientation); |
| 4418 } |
| 4419 |
| 4414 void RenderViewImpl::OnPluginActionAt(const gfx::Point& location, | 4420 void RenderViewImpl::OnPluginActionAt(const gfx::Point& location, |
| 4415 const WebPluginAction& action) { | 4421 const WebPluginAction& action) { |
| 4416 if (webview()) | 4422 if (webview()) |
| 4417 webview()->performPluginAction(action, location); | 4423 webview()->performPluginAction(action, location); |
| 4418 } | 4424 } |
| 4419 | 4425 |
| 4420 void RenderViewImpl::OnGetAllSavableResourceLinksForCurrentPage( | 4426 void RenderViewImpl::OnGetAllSavableResourceLinksForCurrentPage( |
| 4421 const GURL& page_url) { | 4427 const GURL& page_url) { |
| 4422 // Prepare list to storage all savable resource links. | 4428 // Prepare list to storage all savable resource links. |
| 4423 std::vector<GURL> resources_list; | 4429 std::vector<GURL> resources_list; |
| (...skipping 884 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5308 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { | 5314 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { |
| 5309 return !!RenderThreadImpl::current()->compositor_thread(); | 5315 return !!RenderThreadImpl::current()->compositor_thread(); |
| 5310 } | 5316 } |
| 5311 | 5317 |
| 5312 void RenderViewImpl::OnJavaBridgeInit() { | 5318 void RenderViewImpl::OnJavaBridgeInit() { |
| 5313 DCHECK(!java_bridge_dispatcher_.get()); | 5319 DCHECK(!java_bridge_dispatcher_.get()); |
| 5314 #if defined(ENABLE_JAVA_BRIDGE) | 5320 #if defined(ENABLE_JAVA_BRIDGE) |
| 5315 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this)); | 5321 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this)); |
| 5316 #endif | 5322 #endif |
| 5317 } | 5323 } |
| OLD | NEW |