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

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

Issue 23651003: Use Blink accessibility enums in Chromium (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 3 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 986 matching lines...) Expand 10 before | Expand all | Expand 10 after
997 IPC_MESSAGE_HANDLER(DesktopNotificationHostMsg_Cancel, 997 IPC_MESSAGE_HANDLER(DesktopNotificationHostMsg_Cancel,
998 OnCancelDesktopNotification) 998 OnCancelDesktopNotification)
999 #if defined(OS_MACOSX) || defined(OS_ANDROID) 999 #if defined(OS_MACOSX) || defined(OS_ANDROID)
1000 IPC_MESSAGE_HANDLER(ViewHostMsg_ShowPopup, OnShowPopup) 1000 IPC_MESSAGE_HANDLER(ViewHostMsg_ShowPopup, OnShowPopup)
1001 #endif 1001 #endif
1002 IPC_MESSAGE_HANDLER(ViewHostMsg_RunFileChooser, OnRunFileChooser) 1002 IPC_MESSAGE_HANDLER(ViewHostMsg_RunFileChooser, OnRunFileChooser)
1003 IPC_MESSAGE_HANDLER(ViewHostMsg_DidAccessInitialDocument, 1003 IPC_MESSAGE_HANDLER(ViewHostMsg_DidAccessInitialDocument,
1004 OnDidAccessInitialDocument) 1004 OnDidAccessInitialDocument)
1005 IPC_MESSAGE_HANDLER(ViewHostMsg_DomOperationResponse, 1005 IPC_MESSAGE_HANDLER(ViewHostMsg_DomOperationResponse,
1006 OnDomOperationResponse) 1006 OnDomOperationResponse)
1007 IPC_MESSAGE_HANDLER(AccessibilityHostMsg_Notifications, 1007 IPC_MESSAGE_HANDLER(AccessibilityHostMsg_Events, OnAccessibilityEvents)
1008 OnAccessibilityNotifications)
1009 // Have the super handle all other messages. 1008 // Have the super handle all other messages.
1010 IPC_MESSAGE_UNHANDLED( 1009 IPC_MESSAGE_UNHANDLED(
1011 handled = RenderWidgetHostImpl::OnMessageReceived(msg)) 1010 handled = RenderWidgetHostImpl::OnMessageReceived(msg))
1012 IPC_END_MESSAGE_MAP_EX() 1011 IPC_END_MESSAGE_MAP_EX()
1013 1012
1014 if (!msg_is_ok) { 1013 if (!msg_is_ok) {
1015 // The message had a handler, but its de-serialization failed. 1014 // The message had a handler, but its de-serialization failed.
1016 // Kill the renderer. 1015 // Kill the renderer.
1017 RecordAction(UserMetricsAction("BadMessageTerminate_RVH")); 1016 RecordAction(UserMetricsAction("BadMessageTerminate_RVH"));
1018 GetProcess()->ReceivedBadMessage(); 1017 GetProcess()->ReceivedBadMessage();
(...skipping 773 matching lines...) Expand 10 before | Expand all | Expand 10 after
1792 } 1791 }
1793 1792
1794 void RenderViewHostImpl::DisownOpener() { 1793 void RenderViewHostImpl::DisownOpener() {
1795 // This should only be called when swapped out. 1794 // This should only be called when swapped out.
1796 DCHECK(is_swapped_out_); 1795 DCHECK(is_swapped_out_);
1797 1796
1798 Send(new ViewMsg_DisownOpener(GetRoutingID())); 1797 Send(new ViewMsg_DisownOpener(GetRoutingID()));
1799 } 1798 }
1800 1799
1801 void RenderViewHostImpl::SetAccessibilityCallbackForTesting( 1800 void RenderViewHostImpl::SetAccessibilityCallbackForTesting(
1802 const base::Callback<void(AccessibilityNotification)>& callback) { 1801 const base::Callback<void(WebKit::WebAXEvent)>& callback) {
1803 accessibility_testing_callback_ = callback; 1802 accessibility_testing_callback_ = callback;
1804 } 1803 }
1805 1804
1806 void RenderViewHostImpl::UpdateWebkitPreferences(const WebPreferences& prefs) { 1805 void RenderViewHostImpl::UpdateWebkitPreferences(const WebPreferences& prefs) {
1807 Send(new ViewMsg_UpdateWebPreferences(GetRoutingID(), prefs)); 1806 Send(new ViewMsg_UpdateWebPreferences(GetRoutingID(), prefs));
1808 } 1807 }
1809 1808
1810 void RenderViewHostImpl::NotifyTimezoneChange() { 1809 void RenderViewHostImpl::NotifyTimezoneChange() {
1811 Send(new ViewMsg_TimezoneChange(GetRoutingID())); 1810 Send(new ViewMsg_TimezoneChange(GetRoutingID()));
1812 } 1811 }
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
1886 } 1885 }
1887 1886
1888 void RenderViewHostImpl::NotifyMoveOrResizeStarted() { 1887 void RenderViewHostImpl::NotifyMoveOrResizeStarted() {
1889 Send(new ViewMsg_MoveOrResizeStarted(GetRoutingID())); 1888 Send(new ViewMsg_MoveOrResizeStarted(GetRoutingID()));
1890 } 1889 }
1891 1890
1892 void RenderViewHostImpl::StopFinding(StopFindAction action) { 1891 void RenderViewHostImpl::StopFinding(StopFindAction action) {
1893 Send(new ViewMsg_StopFinding(GetRoutingID(), action)); 1892 Send(new ViewMsg_StopFinding(GetRoutingID(), action));
1894 } 1893 }
1895 1894
1896 void RenderViewHostImpl::OnAccessibilityNotifications( 1895 void RenderViewHostImpl::OnAccessibilityEvents(
1897 const std::vector<AccessibilityHostMsg_NotificationParams>& params) { 1896 const std::vector<AccessibilityHostMsg_EventParams>& params) {
1898 if (view_ && !is_swapped_out_) 1897 if (view_ && !is_swapped_out_)
1899 view_->OnAccessibilityNotifications(params); 1898 view_->OnAccessibilityEvents(params);
1900 1899
1901 // Always send an ACK or the renderer can be in a bad state. 1900 // Always send an ACK or the renderer can be in a bad state.
1902 Send(new AccessibilityMsg_Notifications_ACK(GetRoutingID())); 1901 Send(new AccessibilityMsg_Events_ACK(GetRoutingID()));
1903 1902
1904 // The rest of this code is just for testing; bail out if we're not 1903 // The rest of this code is just for testing; bail out if we're not
1905 // in that mode. 1904 // in that mode.
1906 if (accessibility_testing_callback_.is_null()) 1905 if (accessibility_testing_callback_.is_null())
1907 return; 1906 return;
1908 1907
1909 for (unsigned i = 0; i < params.size(); i++) { 1908 for (unsigned i = 0; i < params.size(); i++) {
1910 const AccessibilityHostMsg_NotificationParams& param = params[i]; 1909 const AccessibilityHostMsg_EventParams& param = params[i];
1911 AccessibilityNotification src_type = param.notification_type; 1910 WebKit::WebAXEvent src_type = param.event_type;
1912 if (src_type == AccessibilityNotificationLayoutComplete || 1911 if (src_type == WebKit::WebAXEventLayoutComplete ||
1913 src_type == AccessibilityNotificationLoadComplete) { 1912 src_type == WebKit::WebAXEventLoadComplete) {
1914 MakeAccessibilityNodeDataTree(param.nodes, &accessibility_tree_); 1913 MakeAccessibilityNodeDataTree(param.nodes, &accessibility_tree_);
1915 } 1914 }
1916 accessibility_testing_callback_.Run(src_type); 1915 accessibility_testing_callback_.Run(src_type);
1917 } 1916 }
1918 } 1917 }
1919 1918
1920 void RenderViewHostImpl::OnScriptEvalResponse(int id, 1919 void RenderViewHostImpl::OnScriptEvalResponse(int id,
1921 const base::ListValue& result) { 1920 const base::ListValue& result) {
1922 const base::Value* result_value; 1921 const base::Value* result_value;
1923 if (!result.Get(0, &result_value)) { 1922 if (!result.Get(0, &result_value)) {
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
2065 const std::vector<base::FilePath>& file_paths = state.GetReferencedFiles(); 2064 const std::vector<base::FilePath>& file_paths = state.GetReferencedFiles();
2066 for (std::vector<base::FilePath>::const_iterator file = file_paths.begin(); 2065 for (std::vector<base::FilePath>::const_iterator file = file_paths.begin();
2067 file != file_paths.end(); ++file) { 2066 file != file_paths.end(); ++file) {
2068 if (!policy->CanReadFile(GetProcess()->GetID(), *file)) 2067 if (!policy->CanReadFile(GetProcess()->GetID(), *file))
2069 return false; 2068 return false;
2070 } 2069 }
2071 return true; 2070 return true;
2072 } 2071 }
2073 2072
2074 } // namespace content 2073 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_view_host_impl.h ('k') | content/browser/renderer_host/render_widget_host_view_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698