| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/frame_host/render_frame_host_impl.h" | 5 #include "content/browser/frame_host/render_frame_host_impl.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 2824 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2835 } | 2835 } |
| 2836 | 2836 |
| 2837 bool RenderFrameHostImpl::IsSameSiteInstance( | 2837 bool RenderFrameHostImpl::IsSameSiteInstance( |
| 2838 RenderFrameHostImpl* other_render_frame_host) { | 2838 RenderFrameHostImpl* other_render_frame_host) { |
| 2839 // As a sanity check, make sure the frame belongs to the same BrowserContext. | 2839 // As a sanity check, make sure the frame belongs to the same BrowserContext. |
| 2840 CHECK_EQ(GetSiteInstance()->GetBrowserContext(), | 2840 CHECK_EQ(GetSiteInstance()->GetBrowserContext(), |
| 2841 other_render_frame_host->GetSiteInstance()->GetBrowserContext()); | 2841 other_render_frame_host->GetSiteInstance()->GetBrowserContext()); |
| 2842 return GetSiteInstance() == other_render_frame_host->GetSiteInstance(); | 2842 return GetSiteInstance() == other_render_frame_host->GetSiteInstance(); |
| 2843 } | 2843 } |
| 2844 | 2844 |
| 2845 void RenderFrameHostImpl::SetAccessibilityMode(AccessibilityMode mode) { | 2845 void RenderFrameHostImpl::UpdateAccessibilityMode() { |
| 2846 Send(new FrameMsg_SetAccessibilityMode(routing_id_, mode)); | 2846 AccessibilityMode accessibility_mode = delegate_->GetAccessibilityMode(); |
| 2847 Send(new FrameMsg_SetAccessibilityMode(routing_id_, accessibility_mode)); |
| 2847 } | 2848 } |
| 2848 | 2849 |
| 2849 void RenderFrameHostImpl::RequestAXTreeSnapshot( | 2850 void RenderFrameHostImpl::RequestAXTreeSnapshot( |
| 2850 AXTreeSnapshotCallback callback) { | 2851 AXTreeSnapshotCallback callback) { |
| 2851 static int next_id = 1; | 2852 static int next_id = 1; |
| 2852 int callback_id = next_id++; | 2853 int callback_id = next_id++; |
| 2853 Send(new AccessibilityMsg_SnapshotTree(routing_id_, callback_id)); | 2854 Send(new AccessibilityMsg_SnapshotTree(routing_id_, callback_id)); |
| 2854 ax_tree_snapshot_callbacks_.insert(std::make_pair(callback_id, callback)); | 2855 ax_tree_snapshot_callbacks_.insert(std::make_pair(callback_id, callback)); |
| 2855 } | 2856 } |
| 2856 | 2857 |
| (...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3338 // There is no pending NavigationEntry in these cases, so pass 0 as the | 3339 // There is no pending NavigationEntry in these cases, so pass 0 as the |
| 3339 // pending_nav_entry_id. If the previous handle was a prematurely aborted | 3340 // pending_nav_entry_id. If the previous handle was a prematurely aborted |
| 3340 // navigation loaded via LoadDataWithBaseURL, propagate the entry id. | 3341 // navigation loaded via LoadDataWithBaseURL, propagate the entry id. |
| 3341 return NavigationHandleImpl::Create( | 3342 return NavigationHandleImpl::Create( |
| 3342 params.url, frame_tree_node_, is_renderer_initiated, | 3343 params.url, frame_tree_node_, is_renderer_initiated, |
| 3343 params.was_within_same_page, params.is_srcdoc, base::TimeTicks::Now(), | 3344 params.was_within_same_page, params.is_srcdoc, base::TimeTicks::Now(), |
| 3344 entry_id_for_data_nav, false); // started_from_context_menu | 3345 entry_id_for_data_nav, false); // started_from_context_menu |
| 3345 } | 3346 } |
| 3346 | 3347 |
| 3347 } // namespace content | 3348 } // namespace content |
| OLD | NEW |