| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 | 7 |
| 8 #include <atlbase.h> | 8 #include <atlbase.h> |
| 9 #include <atlapp.h> | 9 #include <atlapp.h> |
| 10 #include <atlcrack.h> | 10 #include <atlcrack.h> |
| 11 #include <atlmisc.h> | 11 #include <atlmisc.h> |
| 12 | 12 |
| 13 #include <vector> | 13 #include <vector> |
| 14 | 14 |
| 15 #include "app/win/window_impl.h" | |
| 16 #include "base/message_loop.h" | 15 #include "base/message_loop.h" |
| 17 #include "base/scoped_comptr_win.h" | 16 #include "base/scoped_comptr_win.h" |
| 17 #include "gfx/window_impl.h" |
| 18 #include "views/focus/focus_manager.h" | 18 #include "views/focus/focus_manager.h" |
| 19 #include "views/layout_manager.h" | 19 #include "views/layout_manager.h" |
| 20 #include "views/widget/widget.h" | 20 #include "views/widget/widget.h" |
| 21 | 21 |
| 22 namespace gfx { | 22 namespace gfx { |
| 23 class CanvasSkia; | 23 class CanvasSkia; |
| 24 class Rect; | 24 class Rect; |
| 25 } | 25 } |
| 26 | 26 |
| 27 namespace views { | 27 namespace views { |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 // A Widget for a views hierarchy used to represent anything that can be | 61 // A Widget for a views hierarchy used to represent anything that can be |
| 62 // contained within an HWND, e.g. a control, a window, etc. Specializations | 62 // contained within an HWND, e.g. a control, a window, etc. Specializations |
| 63 // suitable for specific tasks, e.g. top level window, are derived from this. | 63 // suitable for specific tasks, e.g. top level window, are derived from this. |
| 64 // | 64 // |
| 65 // This Widget contains a RootView which owns the hierarchy of views within it. | 65 // This Widget contains a RootView which owns the hierarchy of views within it. |
| 66 // As long as views are part of this tree, they will be deleted automatically | 66 // As long as views are part of this tree, they will be deleted automatically |
| 67 // when the RootView is destroyed. If you remove a view from the tree, you are | 67 // when the RootView is destroyed. If you remove a view from the tree, you are |
| 68 // then responsible for cleaning up after it. | 68 // then responsible for cleaning up after it. |
| 69 // | 69 // |
| 70 /////////////////////////////////////////////////////////////////////////////// | 70 /////////////////////////////////////////////////////////////////////////////// |
| 71 class WidgetWin : public app::WindowImpl, | 71 class WidgetWin : public gfx::WindowImpl, |
| 72 public Widget, | 72 public Widget, |
| 73 public MessageLoopForUI::Observer, | 73 public MessageLoopForUI::Observer, |
| 74 public FocusTraversable { | 74 public FocusTraversable { |
| 75 public: | 75 public: |
| 76 WidgetWin(); | 76 WidgetWin(); |
| 77 virtual ~WidgetWin(); | 77 virtual ~WidgetWin(); |
| 78 | 78 |
| 79 // Returns the Widget associated with the specified HWND (if any). | 79 // Returns the Widget associated with the specified HWND (if any). |
| 80 static WidgetWin* GetWidget(HWND hwnd); | 80 static WidgetWin* GetWidget(HWND hwnd); |
| 81 | 81 |
| (...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 575 std::vector<View*> accessibility_view_events_; | 575 std::vector<View*> accessibility_view_events_; |
| 576 | 576 |
| 577 // The current position of the view events vector. When incrementing, | 577 // The current position of the view events vector. When incrementing, |
| 578 // we always mod this value with the max view events above . | 578 // we always mod this value with the max view events above . |
| 579 int accessibility_view_events_index_; | 579 int accessibility_view_events_index_; |
| 580 }; | 580 }; |
| 581 | 581 |
| 582 } // namespace views | 582 } // namespace views |
| 583 | 583 |
| 584 #endif // VIEWS_WIDGET_WIDGET_WIN_H_ | 584 #endif // VIEWS_WIDGET_WIDGET_WIN_H_ |
| OLD | NEW |