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

Side by Side Diff: ui/views/widget/desktop_aura/desktop_native_widget_aura.h

Issue 173803002: Redesigns the text input focus handling. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added an unittest and thread checker. Created 6 years, 8 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 | Annotate | Revision Log
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 #ifndef UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_NATIVE_WIDGET_AURA_H_ 5 #ifndef UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_NATIVE_WIDGET_AURA_H_
6 #define UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_NATIVE_WIDGET_AURA_H_ 6 #define UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_NATIVE_WIDGET_AURA_H_
7 7
8 #include "base/memory/weak_ptr.h" 8 #include "base/memory/weak_ptr.h"
9 #include "ui/aura/client/focus_change_observer.h" 9 #include "ui/aura/client/focus_change_observer.h"
10 #include "ui/aura/window_delegate.h" 10 #include "ui/aura/window_delegate.h"
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 virtual void ReorderNativeViews() OVERRIDE; 114 virtual void ReorderNativeViews() OVERRIDE;
115 virtual void ViewRemoved(View* view) OVERRIDE; 115 virtual void ViewRemoved(View* view) OVERRIDE;
116 virtual void SetNativeWindowProperty(const char* name, void* value) OVERRIDE; 116 virtual void SetNativeWindowProperty(const char* name, void* value) OVERRIDE;
117 virtual void* GetNativeWindowProperty(const char* name) const OVERRIDE; 117 virtual void* GetNativeWindowProperty(const char* name) const OVERRIDE;
118 virtual TooltipManager* GetTooltipManager() const OVERRIDE; 118 virtual TooltipManager* GetTooltipManager() const OVERRIDE;
119 virtual void SetCapture() OVERRIDE; 119 virtual void SetCapture() OVERRIDE;
120 virtual void ReleaseCapture() OVERRIDE; 120 virtual void ReleaseCapture() OVERRIDE;
121 virtual bool HasCapture() const OVERRIDE; 121 virtual bool HasCapture() const OVERRIDE;
122 virtual InputMethod* CreateInputMethod() OVERRIDE; 122 virtual InputMethod* CreateInputMethod() OVERRIDE;
123 virtual internal::InputMethodDelegate* GetInputMethodDelegate() OVERRIDE; 123 virtual internal::InputMethodDelegate* GetInputMethodDelegate() OVERRIDE;
124 virtual ui::InputMethod* GetHostInputMethod() OVERRIDE;
124 virtual void CenterWindow(const gfx::Size& size) OVERRIDE; 125 virtual void CenterWindow(const gfx::Size& size) OVERRIDE;
125 virtual void GetWindowPlacement( 126 virtual void GetWindowPlacement(
126 gfx::Rect* bounds, 127 gfx::Rect* bounds,
127 ui::WindowShowState* maximized) const OVERRIDE; 128 ui::WindowShowState* maximized) const OVERRIDE;
128 virtual bool SetWindowTitle(const base::string16& title) OVERRIDE; 129 virtual bool SetWindowTitle(const base::string16& title) OVERRIDE;
129 virtual void SetWindowIcons(const gfx::ImageSkia& window_icon, 130 virtual void SetWindowIcons(const gfx::ImageSkia& window_icon,
130 const gfx::ImageSkia& app_icon) OVERRIDE; 131 const gfx::ImageSkia& app_icon) OVERRIDE;
131 virtual void InitModalType(ui::ModalType modal_type) OVERRIDE; 132 virtual void InitModalType(ui::ModalType modal_type) OVERRIDE;
132 virtual gfx::Rect GetWindowBoundsInScreen() const OVERRIDE; 133 virtual gfx::Rect GetWindowBoundsInScreen() const OVERRIDE;
133 virtual gfx::Rect GetClientAreaBoundsInScreen() const OVERRIDE; 134 virtual gfx::Rect GetClientAreaBoundsInScreen() const OVERRIDE;
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 int last_drop_operation_; 289 int last_drop_operation_;
289 290
290 scoped_ptr<corewm::TooltipController> tooltip_controller_; 291 scoped_ptr<corewm::TooltipController> tooltip_controller_;
291 scoped_ptr<TooltipManagerAura> tooltip_manager_; 292 scoped_ptr<TooltipManagerAura> tooltip_manager_;
292 293
293 scoped_ptr<wm::VisibilityController> visibility_controller_; 294 scoped_ptr<wm::VisibilityController> visibility_controller_;
294 295
295 scoped_ptr<wm::WindowModalityController> 296 scoped_ptr<wm::WindowModalityController>
296 window_modality_controller_; 297 window_modality_controller_;
297 298
298 // See comments in OnLostActive().
299 bool restore_focus_on_activate_; 299 bool restore_focus_on_activate_;
300 300
301 gfx::NativeCursor cursor_; 301 gfx::NativeCursor cursor_;
302 // We must manually reference count the number of users of |cursor_manager_| 302 // We must manually reference count the number of users of |cursor_manager_|
303 // because the cursors created by |cursor_manager_| are shared among the 303 // because the cursors created by |cursor_manager_| are shared among the
304 // DNWAs. We can't just stuff this in a LazyInstance because we need to 304 // DNWAs. We can't just stuff this in a LazyInstance because we need to
305 // destroy this as the last DNWA happens; we can't put it off until 305 // destroy this as the last DNWA happens; we can't put it off until
306 // (potentially) after we tear down the X11 connection because that's a 306 // (potentially) after we tear down the X11 connection because that's a
307 // crash. 307 // crash.
308 static int cursor_reference_count_; 308 static int cursor_reference_count_;
309 static wm::CursorManager* cursor_manager_; 309 static wm::CursorManager* cursor_manager_;
310 static views::DesktopNativeCursorManager* native_cursor_manager_; 310 static views::DesktopNativeCursorManager* native_cursor_manager_;
311 311
312 scoped_ptr<wm::ShadowController> shadow_controller_; 312 scoped_ptr<wm::ShadowController> shadow_controller_;
313 313
314 // Reorders child windows of |window_| associated with a view based on the 314 // Reorders child windows of |window_| associated with a view based on the
315 // order of the associated views in the widget's view hierarchy. 315 // order of the associated views in the widget's view hierarchy.
316 scoped_ptr<WindowReorderer> window_reorderer_; 316 scoped_ptr<WindowReorderer> window_reorderer_;
317 317
318 // See class documentation for Widget in widget.h for a note about type. 318 // See class documentation for Widget in widget.h for a note about type.
319 Widget::InitParams::Type widget_type_; 319 Widget::InitParams::Type widget_type_;
320 320
321 DISALLOW_COPY_AND_ASSIGN(DesktopNativeWidgetAura); 321 DISALLOW_COPY_AND_ASSIGN(DesktopNativeWidgetAura);
322 }; 322 };
323 323
324 } // namespace views 324 } // namespace views
325 325
326 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_NATIVE_WIDGET_AURA_H_ 326 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_NATIVE_WIDGET_AURA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698