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 1446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1457 } | 1457 } |
1458 | 1458 |
1459 void RenderViewHostImpl::DisownOpener() { | 1459 void RenderViewHostImpl::DisownOpener() { |
1460 // This should only be called when swapped out. | 1460 // This should only be called when swapped out. |
1461 DCHECK(IsSwappedOut()); | 1461 DCHECK(IsSwappedOut()); |
1462 | 1462 |
1463 Send(new ViewMsg_DisownOpener(GetRoutingID())); | 1463 Send(new ViewMsg_DisownOpener(GetRoutingID())); |
1464 } | 1464 } |
1465 | 1465 |
1466 void RenderViewHostImpl::SetAccessibilityCallbackForTesting( | 1466 void RenderViewHostImpl::SetAccessibilityCallbackForTesting( |
1467 const base::Callback<void(ui::AXEvent)>& callback) { | 1467 const base::Callback<void(ui::AXEvent, int)>& callback) { |
1468 accessibility_testing_callback_ = callback; | 1468 accessibility_testing_callback_ = callback; |
1469 } | 1469 } |
1470 | 1470 |
1471 void RenderViewHostImpl::UpdateWebkitPreferences(const WebPreferences& prefs) { | 1471 void RenderViewHostImpl::UpdateWebkitPreferences(const WebPreferences& prefs) { |
1472 Send(new ViewMsg_UpdateWebPreferences(GetRoutingID(), prefs)); | 1472 Send(new ViewMsg_UpdateWebPreferences(GetRoutingID(), prefs)); |
1473 } | 1473 } |
1474 | 1474 |
1475 void RenderViewHostImpl::GetAudioOutputControllers( | 1475 void RenderViewHostImpl::GetAudioOutputControllers( |
1476 const GetAudioOutputControllersCallback& callback) const { | 1476 const GetAudioOutputControllersCallback& callback) const { |
1477 AudioRendererHost* audio_host = | 1477 AudioRendererHost* audio_host = |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1568 return; | 1568 return; |
1569 | 1569 |
1570 for (unsigned i = 0; i < params.size(); i++) { | 1570 for (unsigned i = 0; i < params.size(); i++) { |
1571 const AccessibilityHostMsg_EventParams& param = params[i]; | 1571 const AccessibilityHostMsg_EventParams& param = params[i]; |
1572 if (static_cast<int>(param.event_type) < 0) | 1572 if (static_cast<int>(param.event_type) < 0) |
1573 continue; | 1573 continue; |
1574 if (!ax_tree_) | 1574 if (!ax_tree_) |
1575 ax_tree_.reset(new ui::AXTree(param.update)); | 1575 ax_tree_.reset(new ui::AXTree(param.update)); |
1576 else | 1576 else |
1577 CHECK(ax_tree_->Unserialize(param.update)) << ax_tree_->error(); | 1577 CHECK(ax_tree_->Unserialize(param.update)) << ax_tree_->error(); |
1578 accessibility_testing_callback_.Run(param.event_type); | 1578 accessibility_testing_callback_.Run(param.event_type, param.id); |
1579 } | 1579 } |
1580 } | 1580 } |
1581 | 1581 |
1582 void RenderViewHostImpl::OnAccessibilityLocationChanges( | 1582 void RenderViewHostImpl::OnAccessibilityLocationChanges( |
1583 const std::vector<AccessibilityHostMsg_LocationChangeParams>& params) { | 1583 const std::vector<AccessibilityHostMsg_LocationChangeParams>& params) { |
1584 if (view_ && IsRVHStateActive(rvh_state_)) { | 1584 if (view_ && IsRVHStateActive(rvh_state_)) { |
1585 if (accessibility_mode() & AccessibilityModeFlagPlatform) { | 1585 if (accessibility_mode() & AccessibilityModeFlagPlatform) { |
1586 view_->CreateBrowserAccessibilityManagerIfNeeded(); | 1586 view_->CreateBrowserAccessibilityManagerIfNeeded(); |
1587 BrowserAccessibilityManager* manager = | 1587 BrowserAccessibilityManager* manager = |
1588 view_->GetBrowserAccessibilityManager(); | 1588 view_->GetBrowserAccessibilityManager(); |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1683 FrameTree* frame_tree = delegate_->GetFrameTree(); | 1683 FrameTree* frame_tree = delegate_->GetFrameTree(); |
1684 | 1684 |
1685 frame_tree->ResetForMainFrameSwap(); | 1685 frame_tree->ResetForMainFrameSwap(); |
1686 } | 1686 } |
1687 | 1687 |
1688 void RenderViewHostImpl::SelectWordAroundCaret() { | 1688 void RenderViewHostImpl::SelectWordAroundCaret() { |
1689 Send(new ViewMsg_SelectWordAroundCaret(GetRoutingID())); | 1689 Send(new ViewMsg_SelectWordAroundCaret(GetRoutingID())); |
1690 } | 1690 } |
1691 | 1691 |
1692 } // namespace content | 1692 } // namespace content |
OLD | NEW |