| 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 #ifndef VIEWS_WIDGET_WIDGET_WIN_H_ | 5 #ifndef VIEWS_WIDGET_WIDGET_WIN_H_ |
| 6 #define VIEWS_WIDGET_WIDGET_WIN_H_ | 6 #define VIEWS_WIDGET_WIDGET_WIN_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <atlbase.h> | 9 #include <atlbase.h> |
| 10 #include <atlapp.h> | 10 #include <atlapp.h> |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 // child id which is generated by: -(index of view in vector + 1) which | 107 // child id which is generated by: -(index of view in vector + 1) which |
| 108 // guarantees a negative child id. This distinguishes the view from | 108 // guarantees a negative child id. This distinguishes the view from |
| 109 // positive MSAA child id's which are direct leaf children of views that have | 109 // positive MSAA child id's which are direct leaf children of views that have |
| 110 // associated hWnd's (e.g. WidgetWin). | 110 // associated hWnd's (e.g. WidgetWin). |
| 111 int AddAccessibilityViewEvent(View* view); | 111 int AddAccessibilityViewEvent(View* view); |
| 112 | 112 |
| 113 // Clear a view that has recently been removed on a hierarchy change. | 113 // Clear a view that has recently been removed on a hierarchy change. |
| 114 void ClearAccessibilityViewEvent(View* view); | 114 void ClearAccessibilityViewEvent(View* view); |
| 115 | 115 |
| 116 // Overridden from Widget: | 116 // Overridden from Widget: |
| 117 virtual void Init(gfx::NativeView parent, const gfx::Rect& bounds) OVERRIDE; | |
| 118 virtual void InitWithWidget(Widget* parent, const gfx::Rect& bounds) OVERRIDE; | |
| 119 virtual gfx::NativeView GetNativeView() const OVERRIDE; | 117 virtual gfx::NativeView GetNativeView() const OVERRIDE; |
| 120 virtual bool GetAccelerator(int cmd_id, | 118 virtual bool GetAccelerator(int cmd_id, |
| 121 ui::Accelerator* accelerator) OVERRIDE; | 119 ui::Accelerator* accelerator) OVERRIDE; |
| 122 virtual Window* GetWindow() OVERRIDE; | 120 virtual Window* GetWindow() OVERRIDE; |
| 123 virtual const Window* GetWindow() const OVERRIDE; | 121 virtual const Window* GetWindow() const OVERRIDE; |
| 124 virtual void ViewHierarchyChanged(bool is_add, View *parent, | 122 virtual void ViewHierarchyChanged(bool is_add, View *parent, |
| 125 View *child) OVERRIDE; | 123 View *child) OVERRIDE; |
| 126 virtual void NotifyAccessibilityEvent( | 124 virtual void NotifyAccessibilityEvent( |
| 127 View* view, | 125 View* view, |
| 128 ui::AccessibilityTypes::Event event_type, | 126 ui::AccessibilityTypes::Event event_type, |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 | 184 |
| 187 // Resets the last move flag so that we can go around the optimization | 185 // Resets the last move flag so that we can go around the optimization |
| 188 // that disregards duplicate mouse moves when ending animation requires | 186 // that disregards duplicate mouse moves when ending animation requires |
| 189 // a new hit-test to do some highlighting as in TabStrip::RemoveTabAnimation | 187 // a new hit-test to do some highlighting as in TabStrip::RemoveTabAnimation |
| 190 // to cause the close button to highlight. | 188 // to cause the close button to highlight. |
| 191 void ResetLastMouseMoveFlag() { | 189 void ResetLastMouseMoveFlag() { |
| 192 last_mouse_event_was_move_ = false; | 190 last_mouse_event_was_move_ = false; |
| 193 } | 191 } |
| 194 | 192 |
| 195 // Overridden from NativeWidget: | 193 // Overridden from NativeWidget: |
| 196 virtual void SetCreateParams(const Widget::CreateParams& params) OVERRIDE; | 194 virtual void InitNativeWidget(const Widget::CreateParams& params) OVERRIDE; |
| 197 virtual Widget* GetWidget() OVERRIDE; | 195 virtual Widget* GetWidget() OVERRIDE; |
| 198 virtual void SetNativeWindowProperty(const char* name, void* value) OVERRIDE; | 196 virtual void SetNativeWindowProperty(const char* name, void* value) OVERRIDE; |
| 199 virtual void* GetNativeWindowProperty(const char* name) OVERRIDE; | 197 virtual void* GetNativeWindowProperty(const char* name) OVERRIDE; |
| 200 virtual TooltipManager* GetTooltipManager() const OVERRIDE; | 198 virtual TooltipManager* GetTooltipManager() const OVERRIDE; |
| 201 virtual bool IsScreenReaderActive() const OVERRIDE; | 199 virtual bool IsScreenReaderActive() const OVERRIDE; |
| 202 virtual void SetMouseCapture() OVERRIDE; | 200 virtual void SetMouseCapture() OVERRIDE; |
| 203 virtual void ReleaseMouseCapture() OVERRIDE; | 201 virtual void ReleaseMouseCapture() OVERRIDE; |
| 204 virtual bool HasMouseCapture() const OVERRIDE; | 202 virtual bool HasMouseCapture() const OVERRIDE; |
| 205 virtual InputMethod* GetInputMethodNative() OVERRIDE; | 203 virtual InputMethod* GetInputMethodNative() OVERRIDE; |
| 206 virtual void ReplaceInputMethod(InputMethod* input_method) OVERRIDE; | 204 virtual void ReplaceInputMethod(InputMethod* input_method) OVERRIDE; |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 412 // Are a subclass of WindowWin? | 410 // Are a subclass of WindowWin? |
| 413 bool is_window_; | 411 bool is_window_; |
| 414 | 412 |
| 415 private: | 413 private: |
| 416 typedef ScopedVector<ui::ViewProp> ViewProps; | 414 typedef ScopedVector<ui::ViewProp> ViewProps; |
| 417 | 415 |
| 418 // Implementation of GetWindow. Ascends the parents of |hwnd| returning the | 416 // Implementation of GetWindow. Ascends the parents of |hwnd| returning the |
| 419 // first ancestor that is a Window. | 417 // first ancestor that is a Window. |
| 420 static Window* GetWindowImpl(HWND hwnd); | 418 static Window* GetWindowImpl(HWND hwnd); |
| 421 | 419 |
| 420 void SetCreateParams(const Widget::CreateParams& params); |
| 421 |
| 422 // Returns the RootView that contains the focused view, or NULL if there is no | 422 // Returns the RootView that contains the focused view, or NULL if there is no |
| 423 // focused view. | 423 // focused view. |
| 424 RootView* GetFocusedViewRootView(); | 424 RootView* GetFocusedViewRootView(); |
| 425 | 425 |
| 426 // Called after the WM_ACTIVATE message has been processed by the default | 426 // Called after the WM_ACTIVATE message has been processed by the default |
| 427 // windows procedure. | 427 // windows procedure. |
| 428 static void PostProcessActivateMessage(WidgetWin* widget, | 428 static void PostProcessActivateMessage(WidgetWin* widget, |
| 429 int activation_state); | 429 int activation_state); |
| 430 | 430 |
| 431 // Synchronously paints the invalid contents of the Widget. | 431 // Synchronously paints the invalid contents of the Widget. |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 523 | 523 |
| 524 // Indicates if the |input_method_| is an InputMethodWin instance. | 524 // Indicates if the |input_method_| is an InputMethodWin instance. |
| 525 bool is_input_method_win_; | 525 bool is_input_method_win_; |
| 526 | 526 |
| 527 DISALLOW_COPY_AND_ASSIGN(WidgetWin); | 527 DISALLOW_COPY_AND_ASSIGN(WidgetWin); |
| 528 }; | 528 }; |
| 529 | 529 |
| 530 } // namespace views | 530 } // namespace views |
| 531 | 531 |
| 532 #endif // VIEWS_WIDGET_WIDGET_WIN_H_ | 532 #endif // VIEWS_WIDGET_WIDGET_WIN_H_ |
| OLD | NEW |