| 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 1460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1471 } | 1471 } |
| 1472 | 1472 |
| 1473 void RenderViewHostImpl::DisownOpener() { | 1473 void RenderViewHostImpl::DisownOpener() { |
| 1474 // This should only be called when swapped out. | 1474 // This should only be called when swapped out. |
| 1475 DCHECK(IsSwappedOut()); | 1475 DCHECK(IsSwappedOut()); |
| 1476 | 1476 |
| 1477 Send(new ViewMsg_DisownOpener(GetRoutingID())); | 1477 Send(new ViewMsg_DisownOpener(GetRoutingID())); |
| 1478 } | 1478 } |
| 1479 | 1479 |
| 1480 void RenderViewHostImpl::SetAccessibilityCallbackForTesting( | 1480 void RenderViewHostImpl::SetAccessibilityCallbackForTesting( |
| 1481 const base::Callback<void(ui::AXEvent)>& callback) { | 1481 const base::Callback<void(ui::AXEvent, int)>& callback) { |
| 1482 accessibility_testing_callback_ = callback; | 1482 accessibility_testing_callback_ = callback; |
| 1483 } | 1483 } |
| 1484 | 1484 |
| 1485 void RenderViewHostImpl::UpdateWebkitPreferences(const WebPreferences& prefs) { | 1485 void RenderViewHostImpl::UpdateWebkitPreferences(const WebPreferences& prefs) { |
| 1486 Send(new ViewMsg_UpdateWebPreferences(GetRoutingID(), prefs)); | 1486 Send(new ViewMsg_UpdateWebPreferences(GetRoutingID(), prefs)); |
| 1487 } | 1487 } |
| 1488 | 1488 |
| 1489 void RenderViewHostImpl::GetAudioOutputControllers( | 1489 void RenderViewHostImpl::GetAudioOutputControllers( |
| 1490 const GetAudioOutputControllersCallback& callback) const { | 1490 const GetAudioOutputControllersCallback& callback) const { |
| 1491 AudioRendererHost* audio_host = | 1491 AudioRendererHost* audio_host = |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1582 return; | 1582 return; |
| 1583 | 1583 |
| 1584 for (unsigned i = 0; i < params.size(); i++) { | 1584 for (unsigned i = 0; i < params.size(); i++) { |
| 1585 const AccessibilityHostMsg_EventParams& param = params[i]; | 1585 const AccessibilityHostMsg_EventParams& param = params[i]; |
| 1586 if (static_cast<int>(param.event_type) < 0) | 1586 if (static_cast<int>(param.event_type) < 0) |
| 1587 continue; | 1587 continue; |
| 1588 if (!ax_tree_) | 1588 if (!ax_tree_) |
| 1589 ax_tree_.reset(new ui::AXTree(param.update)); | 1589 ax_tree_.reset(new ui::AXTree(param.update)); |
| 1590 else | 1590 else |
| 1591 CHECK(ax_tree_->Unserialize(param.update)) << ax_tree_->error(); | 1591 CHECK(ax_tree_->Unserialize(param.update)) << ax_tree_->error(); |
| 1592 accessibility_testing_callback_.Run(param.event_type); | 1592 accessibility_testing_callback_.Run(param.event_type, param.id); |
| 1593 } | 1593 } |
| 1594 } | 1594 } |
| 1595 | 1595 |
| 1596 void RenderViewHostImpl::OnAccessibilityLocationChanges( | 1596 void RenderViewHostImpl::OnAccessibilityLocationChanges( |
| 1597 const std::vector<AccessibilityHostMsg_LocationChangeParams>& params) { | 1597 const std::vector<AccessibilityHostMsg_LocationChangeParams>& params) { |
| 1598 if (view_ && IsRVHStateActive(rvh_state_)) { | 1598 if (view_ && IsRVHStateActive(rvh_state_)) { |
| 1599 if (accessibility_mode() & AccessibilityModeFlagPlatform) { | 1599 if (accessibility_mode() & AccessibilityModeFlagPlatform) { |
| 1600 view_->CreateBrowserAccessibilityManagerIfNeeded(); | 1600 view_->CreateBrowserAccessibilityManagerIfNeeded(); |
| 1601 BrowserAccessibilityManager* manager = | 1601 BrowserAccessibilityManager* manager = |
| 1602 view_->GetBrowserAccessibilityManager(); | 1602 view_->GetBrowserAccessibilityManager(); |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1693 return true; | 1693 return true; |
| 1694 } | 1694 } |
| 1695 | 1695 |
| 1696 void RenderViewHostImpl::AttachToFrameTree() { | 1696 void RenderViewHostImpl::AttachToFrameTree() { |
| 1697 FrameTree* frame_tree = delegate_->GetFrameTree(); | 1697 FrameTree* frame_tree = delegate_->GetFrameTree(); |
| 1698 | 1698 |
| 1699 frame_tree->ResetForMainFrameSwap(); | 1699 frame_tree->ResetForMainFrameSwap(); |
| 1700 } | 1700 } |
| 1701 | 1701 |
| 1702 } // namespace content | 1702 } // namespace content |
| OLD | NEW |