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 "content/browser/renderer_host/render_view_host.h" | 5 #include "content/browser/renderer_host/render_view_host.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <utility> | 8 #include <utility> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 1581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1592 process()->profile()->GetExtensionMessageService()-> | 1592 process()->profile()->GetExtensionMessageService()-> |
1593 PostMessageFromRenderer(port_id, message); | 1593 PostMessageFromRenderer(port_id, message); |
1594 } | 1594 } |
1595 } | 1595 } |
1596 | 1596 |
1597 void RenderViewHost::OnAccessibilityNotifications( | 1597 void RenderViewHost::OnAccessibilityNotifications( |
1598 const std::vector<ViewHostMsg_AccessibilityNotification_Params>& params) { | 1598 const std::vector<ViewHostMsg_AccessibilityNotification_Params>& params) { |
1599 if (view()) | 1599 if (view()) |
1600 view()->OnAccessibilityNotifications(params); | 1600 view()->OnAccessibilityNotifications(params); |
1601 | 1601 |
1602 if (params.size() > 0) { | 1602 if (!params.empty()) { |
1603 for (unsigned i = 0; i < params.size(); i++) { | 1603 for (unsigned i = 0; i < params.size(); i++) { |
1604 const ViewHostMsg_AccessibilityNotification_Params& param = params[i]; | 1604 const ViewHostMsg_AccessibilityNotification_Params& param = params[i]; |
1605 | 1605 |
1606 if (param.notification_type == | 1606 if (param.notification_type == |
1607 ViewHostMsg_AccessibilityNotification_Params:: | 1607 ViewHostMsg_AccessibilityNotification_Params:: |
1608 NOTIFICATION_TYPE_LOAD_COMPLETE) { | 1608 NOTIFICATION_TYPE_LOAD_COMPLETE) { |
1609 // TODO(ctguil): Remove when mac processes OnAccessibilityNotifications. | 1609 // TODO(ctguil): Remove when mac processes OnAccessibilityNotifications. |
1610 if (view()) | 1610 if (view()) |
1611 view()->UpdateAccessibilityTree(param.acc_obj); | 1611 view()->UpdateAccessibilityTree(param.acc_obj); |
1612 | 1612 |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1702 LOG(DFATAL) << "Invalid checked state " << checked_state; | 1702 LOG(DFATAL) << "Invalid checked state " << checked_state; |
1703 return; | 1703 return; |
1704 } | 1704 } |
1705 | 1705 |
1706 CommandState state; | 1706 CommandState state; |
1707 state.is_enabled = is_enabled; | 1707 state.is_enabled = is_enabled; |
1708 state.checked_state = | 1708 state.checked_state = |
1709 static_cast<RenderViewCommandCheckedState>(checked_state); | 1709 static_cast<RenderViewCommandCheckedState>(checked_state); |
1710 command_states_[static_cast<RenderViewCommand>(command)] = state; | 1710 command_states_[static_cast<RenderViewCommand>(command)] = state; |
1711 } | 1711 } |
OLD | NEW |