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

Side by Side Diff: ui/views/view.h

Issue 2836313002: BoxLayout now suports per-view margins. (Closed)
Patch Set: Merged with master. Removed cached orientation_ from ViewWrapper. 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
« no previous file with comments | « ui/views/layout/box_layout_unittest.cc ('k') | ui/views/view_properties.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_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
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
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_
OLDNEW
« no previous file with comments | « ui/views/layout/box_layout_unittest.cc ('k') | ui/views/view_properties.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698