| 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_VIEW_H_ | 5 #ifndef VIEWS_VIEW_H_ |
| 6 #define VIEWS_VIEW_H_ | 6 #define VIEWS_VIEW_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
| 10 | 10 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 #include "views/accessibility/accessibility_types.h" | 23 #include "views/accessibility/accessibility_types.h" |
| 24 #include "views/background.h" | 24 #include "views/background.h" |
| 25 #include "views/border.h" | 25 #include "views/border.h" |
| 26 | 26 |
| 27 using ui::OSExchangeData; | 27 using ui::OSExchangeData; |
| 28 | 28 |
| 29 // TODO(sad): Use platform independent wrapper for transform matrix. | 29 // TODO(sad): Use platform independent wrapper for transform matrix. |
| 30 class SkMatrix; | 30 class SkMatrix; |
| 31 class ViewAccessibility; | 31 class ViewAccessibility; |
| 32 | 32 |
| 33 #if defined(OS_CHROMEOS) && defined(TOUCH_UI) |
| 34 namespace chromeos { |
| 35 class DOMBrowserView; |
| 36 } |
| 37 #endif |
| 38 |
| 33 namespace gfx { | 39 namespace gfx { |
| 34 class Canvas; | 40 class Canvas; |
| 35 class Insets; | 41 class Insets; |
| 36 class Path; | 42 class Path; |
| 37 } | 43 } |
| 38 | 44 |
| 39 namespace ui { | 45 namespace ui { |
| 40 class ThemeProvider; | 46 class ThemeProvider; |
| 41 } | 47 } |
| 42 using ui::ThemeProvider; | 48 using ui::ThemeProvider; |
| (...skipping 1117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1160 // Returns how much the mouse needs to move in one direction to start a | 1166 // Returns how much the mouse needs to move in one direction to start a |
| 1161 // drag. These methods cache in a platform-appropriate way. These values are | 1167 // drag. These methods cache in a platform-appropriate way. These values are |
| 1162 // used by the public static method ExceededDragThreshold(). | 1168 // used by the public static method ExceededDragThreshold(). |
| 1163 static int GetHorizontalDragThreshold(); | 1169 static int GetHorizontalDragThreshold(); |
| 1164 static int GetVerticalDragThreshold(); | 1170 static int GetVerticalDragThreshold(); |
| 1165 | 1171 |
| 1166 private: | 1172 private: |
| 1167 friend class RootView; | 1173 friend class RootView; |
| 1168 friend class FocusManager; | 1174 friend class FocusManager; |
| 1169 friend class ViewStorage; | 1175 friend class ViewStorage; |
| 1170 | 1176 #if defined(OS_CHROMEOS) && defined(TOUCH_UI) |
| 1177 friend class chromeos::DOMBrowserView; |
| 1178 #endif |
| 1171 // Used to track a drag. RootView passes this into | 1179 // Used to track a drag. RootView passes this into |
| 1172 // ProcessMousePressed/Dragged. | 1180 // ProcessMousePressed/Dragged. |
| 1173 struct DragInfo { | 1181 struct DragInfo { |
| 1174 // Sets possible_drag to false and start_x/y to 0. This is invoked by | 1182 // Sets possible_drag to false and start_x/y to 0. This is invoked by |
| 1175 // RootView prior to invoke ProcessMousePressed. | 1183 // RootView prior to invoke ProcessMousePressed. |
| 1176 void Reset(); | 1184 void Reset(); |
| 1177 | 1185 |
| 1178 // Sets possible_drag to true and start_pt to the specified point. | 1186 // Sets possible_drag to true and start_pt to the specified point. |
| 1179 // This is invoked by the target view if it detects the press may generate | 1187 // This is invoked by the target view if it detects the press may generate |
| 1180 // a drag. | 1188 // a drag. |
| (...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1433 // The accessibility implementation for this View. | 1441 // The accessibility implementation for this View. |
| 1434 scoped_refptr<ViewAccessibility> view_accessibility_; | 1442 scoped_refptr<ViewAccessibility> view_accessibility_; |
| 1435 #endif | 1443 #endif |
| 1436 | 1444 |
| 1437 DISALLOW_COPY_AND_ASSIGN(View); | 1445 DISALLOW_COPY_AND_ASSIGN(View); |
| 1438 }; | 1446 }; |
| 1439 | 1447 |
| 1440 } // namespace views | 1448 } // namespace views |
| 1441 | 1449 |
| 1442 #endif // VIEWS_VIEW_H_ | 1450 #endif // VIEWS_VIEW_H_ |
| OLD | NEW |