| 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_WIDGET_WIDGET_H_ | 5 #ifndef UI_VIEWS_WIDGET_WIDGET_H_ |
| 6 #define UI_VIEWS_WIDGET_WIDGET_H_ | 6 #define UI_VIEWS_WIDGET_WIDGET_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <set> | 9 #include <set> |
| 10 #include <stack> | 10 #include <stack> |
| (...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 249 // Returns the preferred size of the contents view of this window based on | 249 // Returns the preferred size of the contents view of this window based on |
| 250 // its localized size data. The width in cols is held in a localized string | 250 // its localized size data. The width in cols is held in a localized string |
| 251 // resource identified by |col_resource_id|, the height in the same fashion. | 251 // resource identified by |col_resource_id|, the height in the same fashion. |
| 252 // TODO(beng): This should eventually live somewhere else, probably closer to | 252 // TODO(beng): This should eventually live somewhere else, probably closer to |
| 253 // ClientView. | 253 // ClientView. |
| 254 static int GetLocalizedContentsWidth(int col_resource_id); | 254 static int GetLocalizedContentsWidth(int col_resource_id); |
| 255 static int GetLocalizedContentsHeight(int row_resource_id); | 255 static int GetLocalizedContentsHeight(int row_resource_id); |
| 256 static gfx::Size GetLocalizedContentsSize(int col_resource_id, | 256 static gfx::Size GetLocalizedContentsSize(int col_resource_id, |
| 257 int row_resource_id); | 257 int row_resource_id); |
| 258 | 258 |
| 259 // Enable/Disable debug paint. | |
| 260 static void SetDebugPaintEnabled(bool enabled); | |
| 261 static bool IsDebugPaintEnabled(); | |
| 262 | |
| 263 // Returns true if the specified type requires a NonClientView. | 259 // Returns true if the specified type requires a NonClientView. |
| 264 static bool RequiresNonClientView(InitParams::Type type); | 260 static bool RequiresNonClientView(InitParams::Type type); |
| 265 | 261 |
| 266 void Init(const InitParams& params); | 262 void Init(const InitParams& params); |
| 267 | 263 |
| 268 // Returns the gfx::NativeView associated with this Widget. | 264 // Returns the gfx::NativeView associated with this Widget. |
| 269 gfx::NativeView GetNativeView() const; | 265 gfx::NativeView GetNativeView() const; |
| 270 | 266 |
| 271 // Returns the gfx::NativeWindow associated with this Widget. This may return | 267 // Returns the gfx::NativeWindow associated with this Widget. This may return |
| 272 // NULL on some platforms if the widget was created with a type other than | 268 // NULL on some platforms if the widget was created with a type other than |
| (...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 781 // duplicate move events even though the mouse hasn't moved. | 777 // duplicate move events even though the mouse hasn't moved. |
| 782 bool last_mouse_event_was_move_; | 778 bool last_mouse_event_was_move_; |
| 783 gfx::Point last_mouse_event_position_; | 779 gfx::Point last_mouse_event_position_; |
| 784 | 780 |
| 785 DISALLOW_COPY_AND_ASSIGN(Widget); | 781 DISALLOW_COPY_AND_ASSIGN(Widget); |
| 786 }; | 782 }; |
| 787 | 783 |
| 788 } // namespace views | 784 } // namespace views |
| 789 | 785 |
| 790 #endif // UI_VIEWS_WIDGET_WIDGET_H_ | 786 #endif // UI_VIEWS_WIDGET_WIDGET_H_ |
| OLD | NEW |