Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(76)

Side by Side Diff: content/browser/web_contents/web_contents_impl.cc

Issue 145283003: Switch AccessibilityMode to be a bitmap (Closed) Base URL: https://chromium.googlesource.com/chromium/src@enable
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 756 matching lines...) Expand 10 before | Expand all | Expand 10 after
767 767
768 #if defined(OS_WIN) 768 #if defined(OS_WIN)
769 void WebContentsImpl::SetParentNativeViewAccessible( 769 void WebContentsImpl::SetParentNativeViewAccessible(
770 gfx::NativeViewAccessible accessible_parent) { 770 gfx::NativeViewAccessible accessible_parent) {
771 accessible_parent_ = accessible_parent; 771 accessible_parent_ = accessible_parent;
772 if (GetRenderViewHost()) 772 if (GetRenderViewHost())
773 GetRenderViewHostImpl()->SetParentNativeViewAccessible(accessible_parent); 773 GetRenderViewHostImpl()->SetParentNativeViewAccessible(accessible_parent);
774 } 774 }
775 #endif 775 #endif
776 776
777 void WebContentsImpl::SetRendererAccessibilityMode(bool on) {
778 // Set accessibility mode for each RWHV
779 RenderWidgetHostView* view = GetRenderWidgetHostView();
780 RenderWidgetHostImpl* host =
781 RenderWidgetHostImpl::From(view->GetRenderWidgetHost());
782 host->SetRendererAccessibilityMode(on);
783
784 for (std::set<RenderWidgetHostImpl*>::iterator i = created_widgets_.begin();
785 i != created_widgets_.end();
786 ++i) {
787 // TODO(aboxhall): need to also set accessibility mode for new widgets
788 (*i)->SetRendererAccessibilityMode(on);
789 }
790 }
791
777 const base::string16& WebContentsImpl::GetTitle() const { 792 const base::string16& WebContentsImpl::GetTitle() const {
778 // Transient entries take precedence. They are used for interstitial pages 793 // Transient entries take precedence. They are used for interstitial pages
779 // that are shown on top of existing pages. 794 // that are shown on top of existing pages.
780 NavigationEntry* entry = controller_.GetTransientEntry(); 795 NavigationEntry* entry = controller_.GetTransientEntry();
781 std::string accept_languages = 796 std::string accept_languages =
782 GetContentClient()->browser()->GetAcceptLangs( 797 GetContentClient()->browser()->GetAcceptLangs(
783 GetBrowserContext()); 798 GetBrowserContext());
784 if (entry) { 799 if (entry) {
785 return entry->GetTitleForDisplay(accept_languages); 800 return entry->GetTitleForDisplay(accept_languages);
786 } 801 }
(...skipping 3055 matching lines...) Expand 10 before | Expand all | Expand 10 after
3842 } 3857 }
3843 3858
3844 void WebContentsImpl::OnFrameRemoved( 3859 void WebContentsImpl::OnFrameRemoved(
3845 RenderViewHostImpl* render_view_host, 3860 RenderViewHostImpl* render_view_host,
3846 int64 frame_id) { 3861 int64 frame_id) {
3847 FOR_EACH_OBSERVER(WebContentsObserver, observers_, 3862 FOR_EACH_OBSERVER(WebContentsObserver, observers_,
3848 FrameDetached(render_view_host, frame_id)); 3863 FrameDetached(render_view_host, frame_id));
3849 } 3864 }
3850 3865
3851 } // namespace content 3866 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698