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_AURA_WINDOW_H_ | 5 #ifndef UI_AURA_WINDOW_H_ |
6 #define UI_AURA_WINDOW_H_ | 6 #define UI_AURA_WINDOW_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <string> | 10 #include <string> |
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
328 | 328 |
329 // NativeWidget::[GS]etNativeWindowProperty use strings as keys, and this is | 329 // NativeWidget::[GS]etNativeWindowProperty use strings as keys, and this is |
330 // difficult to change while retaining compatibility with other platforms. | 330 // difficult to change while retaining compatibility with other platforms. |
331 // TODO(benrg): Find a better solution. | 331 // TODO(benrg): Find a better solution. |
332 void SetNativeWindowProperty(const char* key, void* value); | 332 void SetNativeWindowProperty(const char* key, void* value); |
333 void* GetNativeWindowProperty(const char* key) const; | 333 void* GetNativeWindowProperty(const char* key) const; |
334 | 334 |
335 // Type of a function to delete a property that this window owns. | 335 // Type of a function to delete a property that this window owns. |
336 typedef void (*PropertyDeallocator)(intptr_t value); | 336 typedef void (*PropertyDeallocator)(intptr_t value); |
337 | 337 |
| 338 // Overridden from ui::LayerDelegate: |
| 339 virtual void OnDeviceScaleFactorChanged(float device_scale_factor) OVERRIDE; |
| 340 |
338 private: | 341 private: |
339 friend class LayoutManager; | 342 friend class LayoutManager; |
340 | 343 |
341 // Used when stacking windows. | 344 // Used when stacking windows. |
342 enum StackDirection { | 345 enum StackDirection { |
343 STACK_ABOVE, | 346 STACK_ABOVE, |
344 STACK_BELOW | 347 STACK_BELOW |
345 }; | 348 }; |
346 | 349 |
347 // Called by the public {Set,Get,Clear}Property functions. | 350 // Called by the public {Set,Get,Clear}Property functions. |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
388 // Called when this window's stacking order among its siblings is changed. | 391 // Called when this window's stacking order among its siblings is changed. |
389 void OnStackingChanged(); | 392 void OnStackingChanged(); |
390 | 393 |
391 // Notifies observers registered with this Window (and its subtree) when the | 394 // Notifies observers registered with this Window (and its subtree) when the |
392 // Window has been added or is about to be removed from a RootWindow. | 395 // Window has been added or is about to be removed from a RootWindow. |
393 void NotifyAddedToRootWindow(); | 396 void NotifyAddedToRootWindow(); |
394 void NotifyRemovingFromRootWindow(); | 397 void NotifyRemovingFromRootWindow(); |
395 | 398 |
396 // Overridden from ui::LayerDelegate: | 399 // Overridden from ui::LayerDelegate: |
397 virtual void OnPaintLayer(gfx::Canvas* canvas) OVERRIDE; | 400 virtual void OnPaintLayer(gfx::Canvas* canvas) OVERRIDE; |
398 virtual void OnDeviceScaleFactorChanged(float device_scale_factor) OVERRIDE; | |
399 | 401 |
400 // Updates the layer name with a name based on the window's name and id. | 402 // Updates the layer name with a name based on the window's name and id. |
401 void UpdateLayerName(const std::string& name); | 403 void UpdateLayerName(const std::string& name); |
402 | 404 |
403 #ifndef NDEBUG | 405 #ifndef NDEBUG |
404 // These methods are useful when debugging. | 406 // These methods are useful when debugging. |
405 std::string GetDebugInfo() const; | 407 std::string GetDebugInfo() const; |
406 void PrintWindowHierarchy(int depth) const; | 408 void PrintWindowHierarchy(int depth) const; |
407 #endif | 409 #endif |
408 | 410 |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
470 }; | 472 }; |
471 | 473 |
472 std::map<const void*, Value> prop_map_; | 474 std::map<const void*, Value> prop_map_; |
473 | 475 |
474 DISALLOW_COPY_AND_ASSIGN(Window); | 476 DISALLOW_COPY_AND_ASSIGN(Window); |
475 }; | 477 }; |
476 | 478 |
477 } // namespace aura | 479 } // namespace aura |
478 | 480 |
479 #endif // UI_AURA_WINDOW_H_ | 481 #endif // UI_AURA_WINDOW_H_ |
OLD | NEW |