Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(211)

Side by Side Diff: content/browser/renderer_host/render_view_host_impl.cc

Issue 157713002: Switch DomAutomationController to be a RenderFrameObserver. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 #include "content/common/inter_process_time_ticks_converter.h" 50 #include "content/common/inter_process_time_ticks_converter.h"
51 #include "content/common/speech_recognition_messages.h" 51 #include "content/common/speech_recognition_messages.h"
52 #include "content/common/swapped_out_messages.h" 52 #include "content/common/swapped_out_messages.h"
53 #include "content/common/view_messages.h" 53 #include "content/common/view_messages.h"
54 #include "content/port/browser/render_view_host_delegate_view.h" 54 #include "content/port/browser/render_view_host_delegate_view.h"
55 #include "content/port/browser/render_widget_host_view_port.h" 55 #include "content/port/browser/render_widget_host_view_port.h"
56 #include "content/public/browser/browser_accessibility_state.h" 56 #include "content/public/browser/browser_accessibility_state.h"
57 #include "content/public/browser/browser_context.h" 57 #include "content/public/browser/browser_context.h"
58 #include "content/public/browser/browser_message_filter.h" 58 #include "content/public/browser/browser_message_filter.h"
59 #include "content/public/browser/content_browser_client.h" 59 #include "content/public/browser/content_browser_client.h"
60 #include "content/public/browser/dom_operation_notification_details.h"
61 #include "content/public/browser/native_web_keyboard_event.h" 60 #include "content/public/browser/native_web_keyboard_event.h"
62 #include "content/public/browser/notification_details.h" 61 #include "content/public/browser/notification_details.h"
63 #include "content/public/browser/notification_service.h" 62 #include "content/public/browser/notification_service.h"
64 #include "content/public/browser/notification_types.h" 63 #include "content/public/browser/notification_types.h"
65 #include "content/public/browser/render_frame_host.h" 64 #include "content/public/browser/render_frame_host.h"
66 #include "content/public/browser/render_widget_host_iterator.h" 65 #include "content/public/browser/render_widget_host_iterator.h"
67 #include "content/public/browser/user_metrics.h" 66 #include "content/public/browser/user_metrics.h"
68 #include "content/public/common/bindings_policy.h" 67 #include "content/public/common/bindings_policy.h"
69 #include "content/public/common/content_constants.h" 68 #include "content/public/common/content_constants.h"
70 #include "content/public/common/content_switches.h" 69 #include "content/public/common/content_switches.h"
(...skipping 1173 matching lines...) Expand 10 before | Expand all | Expand 10 after
1244 IPC_MESSAGE_HANDLER(DesktopNotificationHostMsg_Show, 1243 IPC_MESSAGE_HANDLER(DesktopNotificationHostMsg_Show,
1245 OnShowDesktopNotification) 1244 OnShowDesktopNotification)
1246 IPC_MESSAGE_HANDLER(DesktopNotificationHostMsg_Cancel, 1245 IPC_MESSAGE_HANDLER(DesktopNotificationHostMsg_Cancel,
1247 OnCancelDesktopNotification) 1246 OnCancelDesktopNotification)
1248 #if defined(OS_MACOSX) || defined(OS_ANDROID) 1247 #if defined(OS_MACOSX) || defined(OS_ANDROID)
1249 IPC_MESSAGE_HANDLER(ViewHostMsg_ShowPopup, OnShowPopup) 1248 IPC_MESSAGE_HANDLER(ViewHostMsg_ShowPopup, OnShowPopup)
1250 #endif 1249 #endif
1251 IPC_MESSAGE_HANDLER(ViewHostMsg_RunFileChooser, OnRunFileChooser) 1250 IPC_MESSAGE_HANDLER(ViewHostMsg_RunFileChooser, OnRunFileChooser)
1252 IPC_MESSAGE_HANDLER(ViewHostMsg_DidAccessInitialDocument, 1251 IPC_MESSAGE_HANDLER(ViewHostMsg_DidAccessInitialDocument,
1253 OnDidAccessInitialDocument) 1252 OnDidAccessInitialDocument)
1254 IPC_MESSAGE_HANDLER(ViewHostMsg_DomOperationResponse,
1255 OnDomOperationResponse)
1256 IPC_MESSAGE_HANDLER(AccessibilityHostMsg_Events, OnAccessibilityEvents) 1253 IPC_MESSAGE_HANDLER(AccessibilityHostMsg_Events, OnAccessibilityEvents)
1257 IPC_MESSAGE_HANDLER(AccessibilityHostMsg_LocationChanges, 1254 IPC_MESSAGE_HANDLER(AccessibilityHostMsg_LocationChanges,
1258 OnAccessibilityLocationChanges) 1255 OnAccessibilityLocationChanges)
1259 IPC_MESSAGE_HANDLER(ViewHostMsg_FocusedNodeTouched, OnFocusedNodeTouched) 1256 IPC_MESSAGE_HANDLER(ViewHostMsg_FocusedNodeTouched, OnFocusedNodeTouched)
1260 // Have the super handle all other messages. 1257 // Have the super handle all other messages.
1261 IPC_MESSAGE_UNHANDLED( 1258 IPC_MESSAGE_UNHANDLED(
1262 handled = RenderWidgetHostImpl::OnMessageReceived(msg)) 1259 handled = RenderWidgetHostImpl::OnMessageReceived(msg))
1263 IPC_END_MESSAGE_MAP_EX() 1260 IPC_END_MESSAGE_MAP_EX()
1264 1261
1265 if (!msg_is_ok) { 1262 if (!msg_is_ok) {
(...skipping 763 matching lines...) Expand 10 before | Expand all | Expand 10 after
2029 2026
2030 void RenderViewHostImpl::OnRunFileChooser(const FileChooserParams& params) { 2027 void RenderViewHostImpl::OnRunFileChooser(const FileChooserParams& params) {
2031 delegate_->RunFileChooser(this, params); 2028 delegate_->RunFileChooser(this, params);
2032 } 2029 }
2033 2030
2034 void RenderViewHostImpl::OnDidAccessInitialDocument() { 2031 void RenderViewHostImpl::OnDidAccessInitialDocument() {
2035 has_accessed_initial_document_ = true; 2032 has_accessed_initial_document_ = true;
2036 delegate_->DidAccessInitialDocument(); 2033 delegate_->DidAccessInitialDocument();
2037 } 2034 }
2038 2035
2039 void RenderViewHostImpl::OnDomOperationResponse(
2040 const std::string& json_string, int automation_id) {
2041 DomOperationNotificationDetails details(json_string, automation_id);
2042 NotificationService::current()->Notify(
2043 NOTIFICATION_DOM_OPERATION_RESPONSE,
2044 Source<RenderViewHost>(this),
2045 Details<DomOperationNotificationDetails>(&details));
2046 }
2047
2048 void RenderViewHostImpl::OnFocusedNodeTouched(bool editable) { 2036 void RenderViewHostImpl::OnFocusedNodeTouched(bool editable) {
2049 #if defined(OS_WIN) 2037 #if defined(OS_WIN)
2050 if (editable) { 2038 if (editable) {
2051 virtual_keyboard_requested_ = base::win::DisplayVirtualKeyboard(); 2039 virtual_keyboard_requested_ = base::win::DisplayVirtualKeyboard();
2052 } else { 2040 } else {
2053 virtual_keyboard_requested_ = false; 2041 virtual_keyboard_requested_ = false;
2054 base::win::DismissVirtualKeyboard(); 2042 base::win::DismissVirtualKeyboard();
2055 } 2043 }
2056 #endif 2044 #endif
2057 } 2045 }
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
2110 void RenderViewHostImpl::AttachToFrameTree() { 2098 void RenderViewHostImpl::AttachToFrameTree() {
2111 FrameTree* frame_tree = delegate_->GetFrameTree(); 2099 FrameTree* frame_tree = delegate_->GetFrameTree();
2112 2100
2113 frame_tree->ResetForMainFrameSwap(); 2101 frame_tree->ResetForMainFrameSwap();
2114 if (main_frame_id() != FrameTreeNode::kInvalidFrameId) { 2102 if (main_frame_id() != FrameTreeNode::kInvalidFrameId) {
2115 frame_tree->OnFirstNavigationAfterSwap(main_frame_id()); 2103 frame_tree->OnFirstNavigationAfterSwap(main_frame_id());
2116 } 2104 }
2117 } 2105 }
2118 2106
2119 } // namespace content 2107 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_view_host_impl.h ('k') | content/browser/web_contents/web_contents_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698