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/web_contents/web_contents_impl.h" | 5 #include "content/browser/web_contents/web_contents_impl.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
(...skipping 1756 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1767 AccessibilityMode WebContentsImpl::GetAccessibilityMode() const { | 1767 AccessibilityMode WebContentsImpl::GetAccessibilityMode() const { |
1768 return accessibility_mode_; | 1768 return accessibility_mode_; |
1769 } | 1769 } |
1770 | 1770 |
1771 void WebContentsImpl::AccessibilityEventReceived( | 1771 void WebContentsImpl::AccessibilityEventReceived( |
1772 const std::vector<AXEventNotificationDetails>& details) { | 1772 const std::vector<AXEventNotificationDetails>& details) { |
1773 FOR_EACH_OBSERVER( | 1773 FOR_EACH_OBSERVER( |
1774 WebContentsObserver, observers_, AccessibilityEventReceived(details)); | 1774 WebContentsObserver, observers_, AccessibilityEventReceived(details)); |
1775 } | 1775 } |
1776 | 1776 |
| 1777 RenderFrameHost* WebContentsImpl::GetGuestByInstanceID( |
| 1778 int browser_plugin_instance_id) { |
| 1779 BrowserPluginGuestManager* guest_manager = |
| 1780 GetBrowserContext()->GetGuestManager(); |
| 1781 WebContents* guest = guest_manager->GetGuestByInstanceID( |
| 1782 this, browser_plugin_instance_id); |
| 1783 if (!guest) |
| 1784 return NULL; |
| 1785 return guest->GetMainFrame(); |
| 1786 } |
| 1787 |
1777 void WebContentsImpl::OnShowValidationMessage( | 1788 void WebContentsImpl::OnShowValidationMessage( |
1778 const gfx::Rect& anchor_in_root_view, | 1789 const gfx::Rect& anchor_in_root_view, |
1779 const base::string16& main_text, | 1790 const base::string16& main_text, |
1780 const base::string16& sub_text) { | 1791 const base::string16& sub_text) { |
1781 if (delegate_) | 1792 if (delegate_) |
1782 delegate_->ShowValidationMessage( | 1793 delegate_->ShowValidationMessage( |
1783 this, anchor_in_root_view, main_text, sub_text); | 1794 this, anchor_in_root_view, main_text, sub_text); |
1784 } | 1795 } |
1785 | 1796 |
1786 void WebContentsImpl::OnHideValidationMessage() { | 1797 void WebContentsImpl::OnHideValidationMessage() { |
(...skipping 2459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4246 node->render_manager()->ResumeResponseDeferredAtStart(); | 4257 node->render_manager()->ResumeResponseDeferredAtStart(); |
4247 } | 4258 } |
4248 | 4259 |
4249 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { | 4260 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { |
4250 force_disable_overscroll_content_ = force_disable; | 4261 force_disable_overscroll_content_ = force_disable; |
4251 if (view_) | 4262 if (view_) |
4252 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); | 4263 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); |
4253 } | 4264 } |
4254 | 4265 |
4255 } // namespace content | 4266 } // namespace content |
OLD | NEW |