| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/renderer/render_view.h" | 5 #include "chrome/renderer/render_view.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 18 matching lines...) Expand all Loading... |
| 29 #include "chrome/common/chrome_paths.h" | 29 #include "chrome/common/chrome_paths.h" |
| 30 #include "chrome/common/chrome_switches.h" | 30 #include "chrome/common/chrome_switches.h" |
| 31 #include "chrome/common/database_messages.h" | 31 #include "chrome/common/database_messages.h" |
| 32 #include "chrome/common/extensions/extension.h" | 32 #include "chrome/common/extensions/extension.h" |
| 33 #include "chrome/common/file_system/file_system_dispatcher.h" | 33 #include "chrome/common/file_system/file_system_dispatcher.h" |
| 34 #include "chrome/common/file_system/webfilesystem_callback_dispatcher.h" | 34 #include "chrome/common/file_system/webfilesystem_callback_dispatcher.h" |
| 35 #include "chrome/common/json_value_serializer.h" | 35 #include "chrome/common/json_value_serializer.h" |
| 36 #include "chrome/common/jstemplate_builder.h" | 36 #include "chrome/common/jstemplate_builder.h" |
| 37 #include "chrome/common/notification_service.h" | 37 #include "chrome/common/notification_service.h" |
| 38 #include "chrome/common/page_zoom.h" | 38 #include "chrome/common/page_zoom.h" |
| 39 #include "chrome/common/pepper_messages.h" |
| 39 #include "chrome/common/pepper_plugin_registry.h" | 40 #include "chrome/common/pepper_plugin_registry.h" |
| 40 #include "chrome/common/render_messages.h" | 41 #include "chrome/common/render_messages.h" |
| 41 #include "chrome/common/renderer_preferences.h" | 42 #include "chrome/common/renderer_preferences.h" |
| 42 #include "chrome/common/thumbnail_score.h" | 43 #include "chrome/common/thumbnail_score.h" |
| 43 #include "chrome/common/url_constants.h" | 44 #include "chrome/common/url_constants.h" |
| 44 #include "chrome/common/web_apps.h" | 45 #include "chrome/common/web_apps.h" |
| 45 #include "chrome/common/window_container_type.h" | 46 #include "chrome/common/window_container_type.h" |
| 46 #include "chrome/renderer/about_handler.h" | 47 #include "chrome/renderer/about_handler.h" |
| 47 #include "chrome/renderer/audio_message_filter.h" | 48 #include "chrome/renderer/audio_message_filter.h" |
| 48 #include "chrome/renderer/autofill_helper.h" | 49 #include "chrome/renderer/autofill_helper.h" |
| (...skipping 1032 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1081 OnCustomContextMenuAction) | 1082 OnCustomContextMenuAction) |
| 1082 IPC_MESSAGE_HANDLER(ViewMsg_TranslatePage, OnTranslatePage) | 1083 IPC_MESSAGE_HANDLER(ViewMsg_TranslatePage, OnTranslatePage) |
| 1083 IPC_MESSAGE_HANDLER(ViewMsg_RevertTranslation, OnRevertTranslation) | 1084 IPC_MESSAGE_HANDLER(ViewMsg_RevertTranslation, OnRevertTranslation) |
| 1084 IPC_MESSAGE_HANDLER(ViewMsg_EnableAccessibility, OnEnableAccessibility) | 1085 IPC_MESSAGE_HANDLER(ViewMsg_EnableAccessibility, OnEnableAccessibility) |
| 1085 IPC_MESSAGE_HANDLER(ViewMsg_SetAccessibilityFocus, OnSetAccessibilityFocus) | 1086 IPC_MESSAGE_HANDLER(ViewMsg_SetAccessibilityFocus, OnSetAccessibilityFocus) |
| 1086 IPC_MESSAGE_HANDLER(ViewMsg_AccessibilityDoDefaultAction, | 1087 IPC_MESSAGE_HANDLER(ViewMsg_AccessibilityDoDefaultAction, |
| 1087 OnAccessibilityDoDefaultAction) | 1088 OnAccessibilityDoDefaultAction) |
| 1088 IPC_MESSAGE_HANDLER(ViewMsg_AccessibilityNotifications_ACK, | 1089 IPC_MESSAGE_HANDLER(ViewMsg_AccessibilityNotifications_ACK, |
| 1089 OnAccessibilityNotificationsAck) | 1090 OnAccessibilityNotificationsAck) |
| 1090 IPC_MESSAGE_HANDLER(ViewMsg_AsyncOpenFile_ACK, OnAsyncFileOpened) | 1091 IPC_MESSAGE_HANDLER(ViewMsg_AsyncOpenFile_ACK, OnAsyncFileOpened) |
| 1091 #if defined(ENABLE_FLAPPER_HACKS) | |
| 1092 IPC_MESSAGE_HANDLER(ViewMsg_PepperConnectTcpACK, OnConnectTcpACK) | |
| 1093 #endif | |
| 1094 #if defined(OS_MACOSX) | 1092 #if defined(OS_MACOSX) |
| 1095 IPC_MESSAGE_HANDLER(ViewMsg_SelectPopupMenuItem, OnSelectPopupMenuItem) | 1093 IPC_MESSAGE_HANDLER(ViewMsg_SelectPopupMenuItem, OnSelectPopupMenuItem) |
| 1096 #endif | 1094 #endif |
| 1097 IPC_MESSAGE_HANDLER(ViewMsg_JavaScriptStressTestControl, | 1095 IPC_MESSAGE_HANDLER(ViewMsg_JavaScriptStressTestControl, |
| 1098 OnJavaScriptStressTestControl) | 1096 OnJavaScriptStressTestControl) |
| 1099 IPC_MESSAGE_HANDLER(ViewMsg_ContextMenuClosed, OnContextMenuClosed) | 1097 IPC_MESSAGE_HANDLER(ViewMsg_ContextMenuClosed, OnContextMenuClosed) |
| 1100 | 1098 |
| 1099 // TODO(viettrungluu): Move to a separate message filter. |
| 1100 #if defined(ENABLE_FLAPPER_HACKS) |
| 1101 IPC_MESSAGE_HANDLER(PepperMsg_ConnectTcpACK, OnConnectTcpACK) |
| 1102 #endif |
| 1103 |
| 1101 // Have the super handle all other messages. | 1104 // Have the super handle all other messages. |
| 1102 IPC_MESSAGE_UNHANDLED(handled = RenderWidget::OnMessageReceived(message)) | 1105 IPC_MESSAGE_UNHANDLED(handled = RenderWidget::OnMessageReceived(message)) |
| 1103 IPC_END_MESSAGE_MAP() | 1106 IPC_END_MESSAGE_MAP() |
| 1104 return handled; | 1107 return handled; |
| 1105 } | 1108 } |
| 1106 | 1109 |
| 1107 void RenderView::OnCaptureThumbnail() { | 1110 void RenderView::OnCaptureThumbnail() { |
| 1108 WebFrame* main_frame = webview()->mainFrame(); | 1111 WebFrame* main_frame = webview()->mainFrame(); |
| 1109 if (!main_frame) | 1112 if (!main_frame) |
| 1110 return; | 1113 return; |
| (...skipping 4636 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5747 if (cmd == kJavaScriptStressTestSetStressRunType) { | 5750 if (cmd == kJavaScriptStressTestSetStressRunType) { |
| 5748 v8::Testing::SetStressRunType(static_cast<v8::Testing::StressType>(param)); | 5751 v8::Testing::SetStressRunType(static_cast<v8::Testing::StressType>(param)); |
| 5749 } else if (cmd == kJavaScriptStressTestPrepareStressRun) { | 5752 } else if (cmd == kJavaScriptStressTestPrepareStressRun) { |
| 5750 v8::Testing::PrepareStressRun(param); | 5753 v8::Testing::PrepareStressRun(param); |
| 5751 } | 5754 } |
| 5752 } | 5755 } |
| 5753 | 5756 |
| 5754 void RenderView::OnContextMenuClosed() { | 5757 void RenderView::OnContextMenuClosed() { |
| 5755 context_menu_node_.reset(); | 5758 context_menu_node_.reset(); |
| 5756 } | 5759 } |
| OLD | NEW |