| OLD | NEW |
| 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_VIEW_H_ | 5 #ifndef UI_VIEWS_VIEW_H_ |
| 6 #define UI_VIEWS_VIEW_H_ | 6 #define UI_VIEWS_VIEW_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| 11 #include <map> | 11 #include <map> |
| 12 #include <memory> | 12 #include <memory> |
| 13 #include <set> | 13 #include <set> |
| 14 #include <string> | 14 #include <string> |
| 15 #include <vector> | 15 #include <vector> |
| 16 | 16 |
| 17 #include "base/compiler_specific.h" | 17 #include "base/compiler_specific.h" |
| 18 #include "base/i18n/rtl.h" | 18 #include "base/i18n/rtl.h" |
| 19 #include "base/logging.h" | 19 #include "base/logging.h" |
| 20 #include "base/macros.h" | 20 #include "base/macros.h" |
| 21 #include "build/build_config.h" | 21 #include "build/build_config.h" |
| 22 #include "ui/accessibility/ax_enums.h" | 22 #include "ui/accessibility/ax_enums.h" |
| 23 #include "ui/base/accelerators/accelerator.h" | 23 #include "ui/base/accelerators/accelerator.h" |
| 24 #include "ui/base/class_property.h" |
| 24 #include "ui/base/dragdrop/drag_drop_types.h" | 25 #include "ui/base/dragdrop/drag_drop_types.h" |
| 25 #include "ui/base/dragdrop/drop_target_event.h" | 26 #include "ui/base/dragdrop/drop_target_event.h" |
| 26 #include "ui/base/dragdrop/os_exchange_data.h" | 27 #include "ui/base/dragdrop/os_exchange_data.h" |
| 27 #include "ui/base/ui_base_types.h" | 28 #include "ui/base/ui_base_types.h" |
| 28 #include "ui/compositor/layer_delegate.h" | 29 #include "ui/compositor/layer_delegate.h" |
| 29 #include "ui/compositor/layer_owner.h" | 30 #include "ui/compositor/layer_owner.h" |
| 30 #include "ui/compositor/paint_cache.h" | 31 #include "ui/compositor/paint_cache.h" |
| 31 #include "ui/events/event.h" | 32 #include "ui/events/event.h" |
| 32 #include "ui/events/event_target.h" | 33 #include "ui/events/event_target.h" |
| 33 #include "ui/gfx/geometry/insets.h" | 34 #include "ui/gfx/geometry/insets.h" |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 // specific properties and functionality. | 109 // specific properties and functionality. |
| 109 // | 110 // |
| 110 // Unless otherwise documented, views is not thread safe and should only be | 111 // Unless otherwise documented, views is not thread safe and should only be |
| 111 // accessed from the main thread. | 112 // accessed from the main thread. |
| 112 // | 113 // |
| 113 ///////////////////////////////////////////////////////////////////////////// | 114 ///////////////////////////////////////////////////////////////////////////// |
| 114 class VIEWS_EXPORT View : public ui::LayerDelegate, | 115 class VIEWS_EXPORT View : public ui::LayerDelegate, |
| 115 public ui::LayerOwner, | 116 public ui::LayerOwner, |
| 116 public ui::AcceleratorTarget, | 117 public ui::AcceleratorTarget, |
| 117 public ui::EventTarget, | 118 public ui::EventTarget, |
| 118 public ui::EventHandler { | 119 public ui::EventHandler, |
| 120 public ui::PropertyHandler { |
| 119 public: | 121 public: |
| 120 using Views = std::vector<View*>; | 122 using Views = std::vector<View*>; |
| 121 | 123 |
| 122 enum class FocusBehavior { | 124 enum class FocusBehavior { |
| 123 // Use when the View is never focusable. Default. | 125 // Use when the View is never focusable. Default. |
| 124 NEVER, | 126 NEVER, |
| 125 | 127 |
| 126 // Use when the View is to be focusable both in regular and accessibility | 128 // Use when the View is to be focusable both in regular and accessibility |
| 127 // mode. | 129 // mode. |
| 128 ALWAYS, | 130 ALWAYS, |
| (...skipping 1578 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1707 // Observers ------------------------------------------------------------- | 1709 // Observers ------------------------------------------------------------- |
| 1708 | 1710 |
| 1709 base::ObserverList<ViewObserver> observers_; | 1711 base::ObserverList<ViewObserver> observers_; |
| 1710 | 1712 |
| 1711 DISALLOW_COPY_AND_ASSIGN(View); | 1713 DISALLOW_COPY_AND_ASSIGN(View); |
| 1712 }; | 1714 }; |
| 1713 | 1715 |
| 1714 } // namespace views | 1716 } // namespace views |
| 1715 | 1717 |
| 1716 #endif // UI_VIEWS_VIEW_H_ | 1718 #endif // UI_VIEWS_VIEW_H_ |
| OLD | NEW |