Chromium Code Reviews| 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/browser/renderer_host/render_view_host_impl.h" | 5 #include "content/browser/renderer_host/render_view_host_impl.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 48 #include "content/common/inter_process_time_ticks_converter.h" | 48 #include "content/common/inter_process_time_ticks_converter.h" |
| 49 #include "content/common/speech_recognition_messages.h" | 49 #include "content/common/speech_recognition_messages.h" |
| 50 #include "content/common/swapped_out_messages.h" | 50 #include "content/common/swapped_out_messages.h" |
| 51 #include "content/common/view_messages.h" | 51 #include "content/common/view_messages.h" |
| 52 #include "content/port/browser/render_view_host_delegate_view.h" | 52 #include "content/port/browser/render_view_host_delegate_view.h" |
| 53 #include "content/port/browser/render_widget_host_view_port.h" | 53 #include "content/port/browser/render_widget_host_view_port.h" |
| 54 #include "content/public/browser/browser_accessibility_state.h" | 54 #include "content/public/browser/browser_accessibility_state.h" |
| 55 #include "content/public/browser/browser_context.h" | 55 #include "content/public/browser/browser_context.h" |
| 56 #include "content/public/browser/browser_message_filter.h" | 56 #include "content/public/browser/browser_message_filter.h" |
| 57 #include "content/public/browser/content_browser_client.h" | 57 #include "content/public/browser/content_browser_client.h" |
| 58 #include "content/public/browser/dom_operation_notification_details.h" | |
| 59 #include "content/public/browser/native_web_keyboard_event.h" | 58 #include "content/public/browser/native_web_keyboard_event.h" |
| 60 #include "content/public/browser/notification_details.h" | 59 #include "content/public/browser/notification_details.h" |
| 61 #include "content/public/browser/notification_service.h" | 60 #include "content/public/browser/notification_service.h" |
| 62 #include "content/public/browser/notification_types.h" | 61 #include "content/public/browser/notification_types.h" |
| 63 #include "content/public/browser/render_frame_host.h" | 62 #include "content/public/browser/render_frame_host.h" |
| 64 #include "content/public/browser/render_widget_host_iterator.h" | 63 #include "content/public/browser/render_widget_host_iterator.h" |
| 65 #include "content/public/browser/user_metrics.h" | 64 #include "content/public/browser/user_metrics.h" |
| 66 #include "content/public/common/bindings_policy.h" | 65 #include "content/public/common/bindings_policy.h" |
| 67 #include "content/public/common/content_constants.h" | 66 #include "content/public/common/content_constants.h" |
| 68 #include "content/public/common/content_switches.h" | 67 #include "content/public/common/content_switches.h" |
| (...skipping 1225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1294 IPC_MESSAGE_HANDLER(DesktopNotificationHostMsg_Show, | 1293 IPC_MESSAGE_HANDLER(DesktopNotificationHostMsg_Show, |
| 1295 OnShowDesktopNotification) | 1294 OnShowDesktopNotification) |
| 1296 IPC_MESSAGE_HANDLER(DesktopNotificationHostMsg_Cancel, | 1295 IPC_MESSAGE_HANDLER(DesktopNotificationHostMsg_Cancel, |
| 1297 OnCancelDesktopNotification) | 1296 OnCancelDesktopNotification) |
| 1298 #if defined(OS_MACOSX) || defined(OS_ANDROID) | 1297 #if defined(OS_MACOSX) || defined(OS_ANDROID) |
| 1299 IPC_MESSAGE_HANDLER(ViewHostMsg_ShowPopup, OnShowPopup) | 1298 IPC_MESSAGE_HANDLER(ViewHostMsg_ShowPopup, OnShowPopup) |
| 1300 #endif | 1299 #endif |
| 1301 IPC_MESSAGE_HANDLER(ViewHostMsg_RunFileChooser, OnRunFileChooser) | 1300 IPC_MESSAGE_HANDLER(ViewHostMsg_RunFileChooser, OnRunFileChooser) |
| 1302 IPC_MESSAGE_HANDLER(ViewHostMsg_DidAccessInitialDocument, | 1301 IPC_MESSAGE_HANDLER(ViewHostMsg_DidAccessInitialDocument, |
| 1303 OnDidAccessInitialDocument) | 1302 OnDidAccessInitialDocument) |
| 1304 IPC_MESSAGE_HANDLER(ViewHostMsg_DomOperationResponse, | |
| 1305 OnDomOperationResponse) | |
| 1306 IPC_MESSAGE_HANDLER(AccessibilityHostMsg_Events, OnAccessibilityEvents) | 1303 IPC_MESSAGE_HANDLER(AccessibilityHostMsg_Events, OnAccessibilityEvents) |
| 1307 IPC_MESSAGE_HANDLER(AccessibilityHostMsg_LocationChanges, | 1304 IPC_MESSAGE_HANDLER(AccessibilityHostMsg_LocationChanges, |
| 1308 OnAccessibilityLocationChanges) | 1305 OnAccessibilityLocationChanges) |
| 1309 IPC_MESSAGE_HANDLER(ViewHostMsg_FocusedNodeTouched, OnFocusedNodeTouched) | 1306 IPC_MESSAGE_HANDLER(ViewHostMsg_FocusedNodeTouched, OnFocusedNodeTouched) |
| 1310 // Have the super handle all other messages. | 1307 // Have the super handle all other messages. |
| 1311 IPC_MESSAGE_UNHANDLED( | 1308 IPC_MESSAGE_UNHANDLED( |
| 1312 handled = RenderWidgetHostImpl::OnMessageReceived(msg)) | 1309 handled = RenderWidgetHostImpl::OnMessageReceived(msg)) |
| 1313 IPC_END_MESSAGE_MAP_EX() | 1310 IPC_END_MESSAGE_MAP_EX() |
| 1314 | 1311 |
| 1315 if (!msg_is_ok) { | 1312 if (!msg_is_ok) { |
| (...skipping 868 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2184 | 2181 |
| 2185 void RenderViewHostImpl::OnRunFileChooser(const FileChooserParams& params) { | 2182 void RenderViewHostImpl::OnRunFileChooser(const FileChooserParams& params) { |
| 2186 delegate_->RunFileChooser(this, params); | 2183 delegate_->RunFileChooser(this, params); |
| 2187 } | 2184 } |
| 2188 | 2185 |
| 2189 void RenderViewHostImpl::OnDidAccessInitialDocument() { | 2186 void RenderViewHostImpl::OnDidAccessInitialDocument() { |
| 2190 has_accessed_initial_document_ = true; | 2187 has_accessed_initial_document_ = true; |
| 2191 delegate_->DidAccessInitialDocument(); | 2188 delegate_->DidAccessInitialDocument(); |
| 2192 } | 2189 } |
| 2193 | 2190 |
| 2194 void RenderViewHostImpl::OnDomOperationResponse( | |
|
nasko
2014/02/11 17:32:33
Remove the method from the header file as well.
mkosiba (inactive)
2014/02/14 15:04:41
Done.
| |
| 2195 const std::string& json_string, int automation_id) { | |
| 2196 DomOperationNotificationDetails details(json_string, automation_id); | |
| 2197 NotificationService::current()->Notify( | |
| 2198 NOTIFICATION_DOM_OPERATION_RESPONSE, | |
| 2199 Source<RenderViewHost>(this), | |
| 2200 Details<DomOperationNotificationDetails>(&details)); | |
| 2201 } | |
| 2202 | |
| 2203 void RenderViewHostImpl::OnFocusedNodeTouched(bool editable) { | 2191 void RenderViewHostImpl::OnFocusedNodeTouched(bool editable) { |
| 2204 #if defined(OS_WIN) | 2192 #if defined(OS_WIN) |
| 2205 if (editable) { | 2193 if (editable) { |
| 2206 virtual_keyboard_requested_ = base::win::DisplayVirtualKeyboard(); | 2194 virtual_keyboard_requested_ = base::win::DisplayVirtualKeyboard(); |
| 2207 } else { | 2195 } else { |
| 2208 virtual_keyboard_requested_ = false; | 2196 virtual_keyboard_requested_ = false; |
| 2209 base::win::DismissVirtualKeyboard(); | 2197 base::win::DismissVirtualKeyboard(); |
| 2210 } | 2198 } |
| 2211 #endif | 2199 #endif |
| 2212 } | 2200 } |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2265 void RenderViewHostImpl::AttachToFrameTree() { | 2253 void RenderViewHostImpl::AttachToFrameTree() { |
| 2266 FrameTree* frame_tree = delegate_->GetFrameTree(); | 2254 FrameTree* frame_tree = delegate_->GetFrameTree(); |
| 2267 | 2255 |
| 2268 frame_tree->ResetForMainFrameSwap(); | 2256 frame_tree->ResetForMainFrameSwap(); |
| 2269 if (main_frame_id() != FrameTreeNode::kInvalidFrameId) { | 2257 if (main_frame_id() != FrameTreeNode::kInvalidFrameId) { |
| 2270 frame_tree->OnFirstNavigationAfterSwap(main_frame_id()); | 2258 frame_tree->OnFirstNavigationAfterSwap(main_frame_id()); |
| 2271 } | 2259 } |
| 2272 } | 2260 } |
| 2273 | 2261 |
| 2274 } // namespace content | 2262 } // namespace content |
| OLD | NEW |