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

Side by Side Diff: ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc

Issue 2852763002: Added a system caret used for accessibility on Windows. (Closed)
Patch Set: Added a fake caret for accessibility. Created 3 years, 6 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 "ui/views/widget/desktop_aura/desktop_window_tree_host_win.h" 5 #include "ui/views/widget/desktop_aura/desktop_window_tree_host_win.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "third_party/skia/include/core/SkPath.h" 8 #include "third_party/skia/include/core/SkPath.h"
9 #include "third_party/skia/include/core/SkRegion.h" 9 #include "third_party/skia/include/core/SkRegion.h"
10 #include "ui/aura/client/aura_constants.h" 10 #include "ui/aura/client/aura_constants.h"
11 #include "ui/aura/client/cursor_client.h" 11 #include "ui/aura/client/cursor_client.h"
12 #include "ui/aura/client/focus_client.h" 12 #include "ui/aura/client/focus_client.h"
13 #include "ui/aura/window_event_dispatcher.h" 13 #include "ui/aura/window_event_dispatcher.h"
14 #include "ui/base/class_property.h" 14 #include "ui/base/class_property.h"
15 #include "ui/base/cursor/cursor_loader_win.h" 15 #include "ui/base/cursor/cursor_loader_win.h"
16 #include "ui/base/ime/input_method.h" 16 #include "ui/base/ime/input_method.h"
17 #include "ui/base/ime/input_method_observer.h"
17 #include "ui/base/win/shell.h" 18 #include "ui/base/win/shell.h"
18 #include "ui/compositor/compositor_constants.h" 19 #include "ui/compositor/compositor_constants.h"
19 #include "ui/compositor/paint_context.h" 20 #include "ui/compositor/paint_context.h"
20 #include "ui/display/win/dpi.h" 21 #include "ui/display/win/dpi.h"
21 #include "ui/display/win/screen_win.h" 22 #include "ui/display/win/screen_win.h"
22 #include "ui/gfx/geometry/insets.h" 23 #include "ui/gfx/geometry/insets.h"
23 #include "ui/gfx/geometry/vector2d.h" 24 #include "ui/gfx/geometry/vector2d.h"
24 #include "ui/gfx/native_widget_types.h" 25 #include "ui/gfx/native_widget_types.h"
25 #include "ui/gfx/path.h" 26 #include "ui/gfx/path.h"
26 #include "ui/gfx/path_win.h" 27 #include "ui/gfx/path_win.h"
(...skipping 566 matching lines...) Expand 10 before | Expand all | Expand 10 after
593 } 594 }
594 595
595 void DesktopWindowTreeHostWin::OnWindowHidingAnimationCompleted() { 596 void DesktopWindowTreeHostWin::OnWindowHidingAnimationCompleted() {
596 if (pending_close_) 597 if (pending_close_)
597 message_handler_->Close(); 598 message_handler_->Close();
598 } 599 }
599 600
600 //////////////////////////////////////////////////////////////////////////////// 601 ////////////////////////////////////////////////////////////////////////////////
601 // DesktopWindowTreeHostWin, HWNDMessageHandlerDelegate implementation: 602 // DesktopWindowTreeHostWin, HWNDMessageHandlerDelegate implementation:
602 603
604 void DesktopWindowTreeHostWin::AddInputMethodObserver(
605 ui::InputMethodObserver* observer) {
606 GetInputMethod()->AddObserver(observer);
607 }
608
609 void DesktopWindowTreeHostWin::RemoveInputMethodObserver(
610 ui::InputMethodObserver* observer) {
611 GetInputMethod()->RemoveObserver(observer);
612 }
613
603 bool DesktopWindowTreeHostWin::HasNonClientView() const { 614 bool DesktopWindowTreeHostWin::HasNonClientView() const {
604 return has_non_client_view_; 615 return has_non_client_view_;
605 } 616 }
606 617
607 FrameMode DesktopWindowTreeHostWin::GetFrameMode() const { 618 FrameMode DesktopWindowTreeHostWin::GetFrameMode() const {
608 return GetWidget()->ShouldUseNativeFrame() ? FrameMode::SYSTEM_DRAWN 619 return GetWidget()->ShouldUseNativeFrame() ? FrameMode::SYSTEM_DRAWN
609 : FrameMode::CUSTOM_DRAWN; 620 : FrameMode::CUSTOM_DRAWN;
610 } 621 }
611 622
612 bool DesktopWindowTreeHostWin::HasFrame() const { 623 bool DesktopWindowTreeHostWin::HasFrame() const {
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after
995 1006
996 // static 1007 // static
997 DesktopWindowTreeHost* DesktopWindowTreeHost::Create( 1008 DesktopWindowTreeHost* DesktopWindowTreeHost::Create(
998 internal::NativeWidgetDelegate* native_widget_delegate, 1009 internal::NativeWidgetDelegate* native_widget_delegate,
999 DesktopNativeWidgetAura* desktop_native_widget_aura) { 1010 DesktopNativeWidgetAura* desktop_native_widget_aura) {
1000 return new DesktopWindowTreeHostWin(native_widget_delegate, 1011 return new DesktopWindowTreeHostWin(native_widget_delegate,
1001 desktop_native_widget_aura); 1012 desktop_native_widget_aura);
1002 } 1013 }
1003 1014
1004 } // namespace views 1015 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698