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 // Need a few defines from Win 7 headers for WM_GESTURE and | 5 // Need a few defines from Win 7 headers for WM_GESTURE and |
6 // ChangeWindowMessageFilterEx. | 6 // ChangeWindowMessageFilterEx. |
7 // TODO(jschuh): See crbug.com/92941 for longterm fix. | 7 // TODO(jschuh): See crbug.com/92941 for longterm fix. |
8 #include <windows.h> | 8 #include <windows.h> |
9 #if(WINVER < 0x0601) | 9 #if(WINVER < 0x0601) |
10 typedef struct tagCHANGEFILTERSTRUCT { | 10 typedef struct tagCHANGEFILTERSTRUCT { |
(...skipping 744 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
755 } | 755 } |
756 } | 756 } |
757 | 757 |
758 BackingStore* RenderWidgetHostViewWin::AllocBackingStore( | 758 BackingStore* RenderWidgetHostViewWin::AllocBackingStore( |
759 const gfx::Size& size) { | 759 const gfx::Size& size) { |
760 return new BackingStoreWin(render_widget_host_, size); | 760 return new BackingStoreWin(render_widget_host_, size); |
761 } | 761 } |
762 | 762 |
763 void RenderWidgetHostViewWin::SetBackground(const SkBitmap& background) { | 763 void RenderWidgetHostViewWin::SetBackground(const SkBitmap& background) { |
764 RenderWidgetHostView::SetBackground(background); | 764 RenderWidgetHostView::SetBackground(background); |
765 Send(new ViewMsg_SetBackground(render_widget_host_->routing_id(), | 765 render_widget_host_->SetBackground(background); |
766 background)); | |
767 } | 766 } |
768 | 767 |
769 void RenderWidgetHostViewWin::SetVisuallyDeemphasized(const SkColor* color, | 768 void RenderWidgetHostViewWin::SetVisuallyDeemphasized(const SkColor* color, |
770 bool animate) { | 769 bool animate) { |
771 // |animate| is not yet implemented, and currently isn't used. | 770 // |animate| is not yet implemented, and currently isn't used. |
772 CHECK(!animate); | 771 CHECK(!animate); |
773 | 772 |
774 SkColor overlay_color = color ? *color : 0; | 773 SkColor overlay_color = color ? *color : 0; |
775 if (overlay_color_ == overlay_color) | 774 if (overlay_color_ == overlay_color) |
776 return; | 775 return; |
(...skipping 846 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1623 } | 1622 } |
1624 } else { | 1623 } else { |
1625 hide_compositor_window_at_next_paint_ = true; | 1624 hide_compositor_window_at_next_paint_ = true; |
1626 } | 1625 } |
1627 } | 1626 } |
1628 | 1627 |
1629 void RenderWidgetHostViewWin::SetAccessibilityFocus(int acc_obj_id) { | 1628 void RenderWidgetHostViewWin::SetAccessibilityFocus(int acc_obj_id) { |
1630 if (!render_widget_host_) | 1629 if (!render_widget_host_) |
1631 return; | 1630 return; |
1632 | 1631 |
1633 render_widget_host_->Send(new ViewMsg_SetAccessibilityFocus( | 1632 render_widget_host_->AccessibilitySetFocus(acc_obj_id); |
1634 render_widget_host_->routing_id(), acc_obj_id)); | |
1635 } | 1633 } |
1636 | 1634 |
1637 void RenderWidgetHostViewWin::AccessibilityDoDefaultAction(int acc_obj_id) { | 1635 void RenderWidgetHostViewWin::AccessibilityDoDefaultAction(int acc_obj_id) { |
1638 if (!render_widget_host_) | 1636 if (!render_widget_host_) |
1639 return; | 1637 return; |
1640 | 1638 |
1641 render_widget_host_->Send(new ViewMsg_AccessibilityDoDefaultAction( | 1639 render_widget_host_->AccessibilityDoDefaultAction(acc_obj_id); |
1642 render_widget_host_->routing_id(), acc_obj_id)); | |
1643 } | 1640 } |
1644 | 1641 |
1645 IAccessible* RenderWidgetHostViewWin::GetIAccessible() { | 1642 IAccessible* RenderWidgetHostViewWin::GetIAccessible() { |
1646 if (render_widget_host_ && !render_widget_host_->renderer_accessible()) { | 1643 if (render_widget_host_ && !render_widget_host_->renderer_accessible()) { |
1647 // Attempt to detect screen readers by sending an event with our custom id. | 1644 // Attempt to detect screen readers by sending an event with our custom id. |
1648 NotifyWinEvent(EVENT_SYSTEM_ALERT, m_hWnd, kIdCustom, CHILDID_SELF); | 1645 NotifyWinEvent(EVENT_SYSTEM_ALERT, m_hWnd, kIdCustom, CHILDID_SELF); |
1649 } | 1646 } |
1650 | 1647 |
1651 if (!browser_accessibility_manager_.get()) { | 1648 if (!browser_accessibility_manager_.get()) { |
1652 // Return busy document tree while renderer accessibility tree loads. | 1649 // Return busy document tree while renderer accessibility tree loads. |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1839 DWORD ex_style) { | 1836 DWORD ex_style) { |
1840 parent_hwnd_ = parent_hwnd; | 1837 parent_hwnd_ = parent_hwnd; |
1841 Create(parent_hwnd_, NULL, NULL, WS_POPUP, ex_style); | 1838 Create(parent_hwnd_, NULL, NULL, WS_POPUP, ex_style); |
1842 MoveWindow(pos.x(), pos.y(), pos.width(), pos.height(), TRUE); | 1839 MoveWindow(pos.x(), pos.y(), pos.width(), pos.height(), TRUE); |
1843 // To show tooltip on popup window.(e.g. title in <select>) | 1840 // To show tooltip on popup window.(e.g. title in <select>) |
1844 // Popups default to showing, which means |DidBecomeSelected()| isn't invoked. | 1841 // Popups default to showing, which means |DidBecomeSelected()| isn't invoked. |
1845 // Ensure the tooltip is created otherwise tooltips are never shown. | 1842 // Ensure the tooltip is created otherwise tooltips are never shown. |
1846 EnsureTooltip(); | 1843 EnsureTooltip(); |
1847 ShowWindow(IsActivatable() ? SW_SHOW : SW_SHOWNA); | 1844 ShowWindow(IsActivatable() ? SW_SHOW : SW_SHOWNA); |
1848 } | 1845 } |
OLD | NEW |