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 1379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1390 | 1390 |
1391 void RenderViewHost::OnAccessibilityNotifications( | 1391 void RenderViewHost::OnAccessibilityNotifications( |
1392 const std::vector<ViewHostMsg_AccessibilityNotification_Params>& params) { | 1392 const std::vector<ViewHostMsg_AccessibilityNotification_Params>& params) { |
1393 if (view() && !is_swapped_out_) | 1393 if (view() && !is_swapped_out_) |
1394 view()->OnAccessibilityNotifications(params); | 1394 view()->OnAccessibilityNotifications(params); |
1395 | 1395 |
1396 if (!params.empty()) { | 1396 if (!params.empty()) { |
1397 for (unsigned i = 0; i < params.size(); i++) { | 1397 for (unsigned i = 0; i < params.size(); i++) { |
1398 const ViewHostMsg_AccessibilityNotification_Params& param = params[i]; | 1398 const ViewHostMsg_AccessibilityNotification_Params& param = params[i]; |
1399 | 1399 |
1400 if (param.notification_type == ViewHostMsg_AccEvent::LOAD_COMPLETE && | 1400 if ((param.notification_type == ViewHostMsg_AccEvent::LAYOUT_COMPLETE || |
1401 param.notification_type == ViewHostMsg_AccEvent::LOAD_COMPLETE) && | |
1401 save_accessibility_tree_for_testing_) { | 1402 save_accessibility_tree_for_testing_) { |
dmazzoni
2011/12/10 06:27:36
I just realized that there's no reason to go throu
David Tseng
2011/12/12 01:23:57
I'd like to keep this as is to avoid any possible
| |
1402 accessibility_tree_ = param.acc_tree; | 1403 accessibility_tree_ = param.acc_tree; |
1403 content::NotificationService::current()->Notify( | 1404 |
1404 content::NOTIFICATION_RENDER_VIEW_HOST_ACCESSIBILITY_TREE_UPDATED, | 1405 // Only notify for non-blank pages. |
1405 content::Source<RenderViewHost>(this), | 1406 if (accessibility_tree_.children.size() > 0) |
1406 content::NotificationService::NoDetails()); | 1407 content::NotificationService::current()->Notify( |
1408 content::NOTIFICATION_RENDER_VIEW_HOST_ACCESSIBILITY_TREE_UPDATED, | |
1409 content::Source<RenderViewHost>(this), | |
1410 content::NotificationService::NoDetails()); | |
1407 } | 1411 } |
1408 } | 1412 } |
1409 } | 1413 } |
1410 | 1414 |
1411 Send(new ViewMsg_AccessibilityNotifications_ACK(routing_id())); | 1415 Send(new ViewMsg_AccessibilityNotifications_ACK(routing_id())); |
1412 } | 1416 } |
1413 | 1417 |
1414 void RenderViewHost::OnScriptEvalResponse(int id, const ListValue& result) { | 1418 void RenderViewHost::OnScriptEvalResponse(int id, const ListValue& result) { |
1415 Value* result_value; | 1419 Value* result_value; |
1416 if (!result.Get(0, &result_value)) { | 1420 if (!result.Get(0, &result_value)) { |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1520 | 1524 |
1521 void RenderViewHost::OnWebUISend(const GURL& source_url, | 1525 void RenderViewHost::OnWebUISend(const GURL& source_url, |
1522 const std::string& name, | 1526 const std::string& name, |
1523 const base::ListValue& args) { | 1527 const base::ListValue& args) { |
1524 delegate_->WebUISend(this, source_url, name, args); | 1528 delegate_->WebUISend(this, source_url, name, args); |
1525 } | 1529 } |
1526 | 1530 |
1527 void RenderViewHost::ClearPowerSaveBlockers() { | 1531 void RenderViewHost::ClearPowerSaveBlockers() { |
1528 STLDeleteValues(&power_save_blockers_); | 1532 STLDeleteValues(&power_save_blockers_); |
1529 } | 1533 } |
OLD | NEW |