OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/i18n/rtl.h" | 10 #include "base/i18n/rtl.h" |
11 #include "base/metrics/histogram.h" | 11 #include "base/metrics/histogram.h" |
12 #include "base/process_util.h" | 12 #include "base/process_util.h" |
13 #include "base/scoped_comptr_win.h" | |
14 #include "base/threading/thread.h" | 13 #include "base/threading/thread.h" |
| 14 #include "base/win/scoped_comptr.h" |
15 #include "base/win/scoped_gdi_object.h" | 15 #include "base/win/scoped_gdi_object.h" |
16 #include "base/win/wrapped_window_proc.h" | 16 #include "base/win/wrapped_window_proc.h" |
17 #include "chrome/browser/accessibility/browser_accessibility_manager.h" | 17 #include "chrome/browser/accessibility/browser_accessibility_manager.h" |
18 #include "chrome/browser/accessibility/browser_accessibility_state.h" | 18 #include "chrome/browser/accessibility/browser_accessibility_state.h" |
19 #include "chrome/browser/accessibility/browser_accessibility_win.h" | 19 #include "chrome/browser/accessibility/browser_accessibility_win.h" |
20 #include "chrome/browser/browser_trial.h" | 20 #include "chrome/browser/browser_trial.h" |
21 #include "chrome/common/chrome_constants.h" | 21 #include "chrome/common/chrome_constants.h" |
22 #include "chrome/common/chrome_switches.h" | 22 #include "chrome/common/chrome_switches.h" |
23 #include "chrome/common/render_messages.h" | 23 #include "chrome/common/render_messages.h" |
24 #include "content/browser/browser_thread.h" | 24 #include "content/browser/browser_thread.h" |
(...skipping 1627 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1652 | 1652 |
1653 if (!browser_accessibility_manager_.get()) { | 1653 if (!browser_accessibility_manager_.get()) { |
1654 // Return busy document tree while renderer accessibility tree loads. | 1654 // Return busy document tree while renderer accessibility tree loads. |
1655 webkit_glue::WebAccessibility loading_tree; | 1655 webkit_glue::WebAccessibility loading_tree; |
1656 loading_tree.role = WebAccessibility::ROLE_DOCUMENT; | 1656 loading_tree.role = WebAccessibility::ROLE_DOCUMENT; |
1657 loading_tree.state = (1 << WebAccessibility::STATE_BUSY); | 1657 loading_tree.state = (1 << WebAccessibility::STATE_BUSY); |
1658 browser_accessibility_manager_.reset( | 1658 browser_accessibility_manager_.reset( |
1659 BrowserAccessibilityManager::Create(m_hWnd, loading_tree, this)); | 1659 BrowserAccessibilityManager::Create(m_hWnd, loading_tree, this)); |
1660 } | 1660 } |
1661 | 1661 |
1662 ScopedComPtr<IAccessible> root( | 1662 base::win::ScopedComPtr<IAccessible> root( |
1663 browser_accessibility_manager_->GetRoot()->toBrowserAccessibilityWin()); | 1663 browser_accessibility_manager_->GetRoot()->toBrowserAccessibilityWin()); |
1664 if (root.get()) | 1664 if (root.get()) |
1665 return LresultFromObject(IID_IAccessible, wparam, root.Detach()); | 1665 return LresultFromObject(IID_IAccessible, wparam, root.Detach()); |
1666 | 1666 |
1667 handled = false; | 1667 handled = false; |
1668 return static_cast<LRESULT>(0L); | 1668 return static_cast<LRESULT>(0L); |
1669 } | 1669 } |
1670 | 1670 |
1671 LRESULT RenderWidgetHostViewWin::OnParentNotify(UINT message, WPARAM wparam, | 1671 LRESULT RenderWidgetHostViewWin::OnParentNotify(UINT message, WPARAM wparam, |
1672 LPARAM lparam, BOOL& handled) { | 1672 LPARAM lparam, BOOL& handled) { |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1803 } | 1803 } |
1804 | 1804 |
1805 // static | 1805 // static |
1806 RenderWidgetHostView* | 1806 RenderWidgetHostView* |
1807 RenderWidgetHostView::GetRenderWidgetHostViewFromNativeView( | 1807 RenderWidgetHostView::GetRenderWidgetHostViewFromNativeView( |
1808 gfx::NativeView native_view) { | 1808 gfx::NativeView native_view) { |
1809 return ::IsWindow(native_view) ? | 1809 return ::IsWindow(native_view) ? |
1810 reinterpret_cast<RenderWidgetHostView*>( | 1810 reinterpret_cast<RenderWidgetHostView*>( |
1811 ViewProp::GetValue(native_view, kRenderWidgetHostViewKey)) : NULL; | 1811 ViewProp::GetValue(native_view, kRenderWidgetHostViewKey)) : NULL; |
1812 } | 1812 } |
OLD | NEW |