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

Side by Side Diff: chrome/browser/renderer_host/render_widget_host_view_win.cc

Issue 5711001: Add a new GetInstance() method for remaining files with singleton classes under chrome/browser. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 10 years 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "chrome/browser/renderer_host/render_widget_host_view_win.h" 5 #include "chrome/browser/renderer_host/render_widget_host_view_win.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "app/l10n_util.h" 9 #include "app/l10n_util.h"
10 #include "app/l10n_util_win.h" 10 #include "app/l10n_util_win.h"
(...skipping 1628 matching lines...) Expand 10 before | Expand all | Expand 10 after
1639 } 1639 }
1640 1640
1641 render_widget_host_->AccessibilityDoDefaultAction(acc_obj_id); 1641 render_widget_host_->AccessibilityDoDefaultAction(acc_obj_id);
1642 } 1642 }
1643 1643
1644 LRESULT RenderWidgetHostViewWin::OnGetObject(UINT message, WPARAM wparam, 1644 LRESULT RenderWidgetHostViewWin::OnGetObject(UINT message, WPARAM wparam,
1645 LPARAM lparam, BOOL& handled) { 1645 LPARAM lparam, BOOL& handled) {
1646 if (kIdCustom == lparam) { 1646 if (kIdCustom == lparam) {
1647 // An MSAA client requestes our custom id. Assume that we have detected an 1647 // An MSAA client requestes our custom id. Assume that we have detected an
1648 // active windows screen reader. 1648 // active windows screen reader.
1649 Singleton<BrowserAccessibilityState>()->OnScreenReaderDetected(); 1649 BrowserAccessibilityState::GetInstance()->OnScreenReaderDetected();
1650 render_widget_host_->EnableRendererAccessibility(); 1650 render_widget_host_->EnableRendererAccessibility();
1651 1651
1652 // Return with failure. 1652 // Return with failure.
1653 return static_cast<LRESULT>(0L); 1653 return static_cast<LRESULT>(0L);
1654 } 1654 }
1655 1655
1656 if (lparam != OBJID_CLIENT) { 1656 if (lparam != OBJID_CLIENT) {
1657 handled = false; 1657 handled = false;
1658 return static_cast<LRESULT>(0L); 1658 return static_cast<LRESULT>(0L);
1659 } 1659 }
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
1797 } 1797 }
1798 1798
1799 // static 1799 // static
1800 RenderWidgetHostView* 1800 RenderWidgetHostView*
1801 RenderWidgetHostView::GetRenderWidgetHostViewFromNativeView( 1801 RenderWidgetHostView::GetRenderWidgetHostViewFromNativeView(
1802 gfx::NativeView native_view) { 1802 gfx::NativeView native_view) {
1803 return ::IsWindow(native_view) ? 1803 return ::IsWindow(native_view) ?
1804 reinterpret_cast<RenderWidgetHostView*>( 1804 reinterpret_cast<RenderWidgetHostView*>(
1805 ViewProp::GetValue(native_view, kRenderWidgetHostViewKey)) : NULL; 1805 ViewProp::GetValue(native_view, kRenderWidgetHostViewKey)) : NULL;
1806 } 1806 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698