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 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
311 // TODO(benrg): Find a better solution. | 311 // TODO(benrg): Find a better solution. |
312 void SetNativeWindowProperty(const char* key, void* value); | 312 void SetNativeWindowProperty(const char* key, void* value); |
313 void* GetNativeWindowProperty(const char* key) const; | 313 void* GetNativeWindowProperty(const char* key) const; |
314 | 314 |
315 // Type of a function to delete a property that this window owns. | 315 // Type of a function to delete a property that this window owns. |
316 typedef void (*PropertyDeallocator)(int64 value); | 316 typedef void (*PropertyDeallocator)(int64 value); |
317 | 317 |
318 // Overridden from ui::LayerDelegate: | 318 // Overridden from ui::LayerDelegate: |
319 void OnDeviceScaleFactorChanged(float device_scale_factor) override; | 319 void OnDeviceScaleFactorChanged(float device_scale_factor) override; |
320 | 320 |
321 // Overridden from ui::EventTarget: | |
Nina
2015/01/09 15:43:49
Moving this to public is needed for the new code t
| |
322 ui::EventTargeter* GetEventTargeter() override; | |
323 | |
321 #if !defined(NDEBUG) | 324 #if !defined(NDEBUG) |
322 // These methods are useful when debugging. | 325 // These methods are useful when debugging. |
323 std::string GetDebugInfo() const; | 326 std::string GetDebugInfo() const; |
324 void PrintWindowHierarchy(int depth) const; | 327 void PrintWindowHierarchy(int depth) const; |
325 #endif | 328 #endif |
326 | 329 |
327 // Returns true if there was state needing to be cleaned up. | 330 // Returns true if there was state needing to be cleaned up. |
328 bool CleanupGestureState(); | 331 bool CleanupGestureState(); |
329 | 332 |
330 protected: | 333 protected: |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
460 | 463 |
461 // Overridden from ui::LayerDelegate: | 464 // Overridden from ui::LayerDelegate: |
462 void OnPaintLayer(gfx::Canvas* canvas) override; | 465 void OnPaintLayer(gfx::Canvas* canvas) override; |
463 void OnDelegatedFrameDamage(const gfx::Rect& damage_rect_in_dip) override; | 466 void OnDelegatedFrameDamage(const gfx::Rect& damage_rect_in_dip) override; |
464 base::Closure PrepareForLayerBoundsChange() override; | 467 base::Closure PrepareForLayerBoundsChange() override; |
465 | 468 |
466 // Overridden from ui::EventTarget: | 469 // Overridden from ui::EventTarget: |
467 bool CanAcceptEvent(const ui::Event& event) override; | 470 bool CanAcceptEvent(const ui::Event& event) override; |
468 EventTarget* GetParentTarget() override; | 471 EventTarget* GetParentTarget() override; |
469 scoped_ptr<ui::EventTargetIterator> GetChildIterator() const override; | 472 scoped_ptr<ui::EventTargetIterator> GetChildIterator() const override; |
470 ui::EventTargeter* GetEventTargeter() override; | |
471 void ConvertEventToTarget(ui::EventTarget* target, | 473 void ConvertEventToTarget(ui::EventTarget* target, |
472 ui::LocatedEvent* event) override; | 474 ui::LocatedEvent* event) override; |
473 | 475 |
474 // Updates the layer name based on the window's name and id. | 476 // Updates the layer name based on the window's name and id. |
475 void UpdateLayerName(); | 477 void UpdateLayerName(); |
476 | 478 |
477 // Returns the first ancestor (starting at |this|) with a layer. |offset| is | 479 // Returns the first ancestor (starting at |this|) with a layer. |offset| is |
478 // set to the offset from |this| to the first ancestor with a layer. |offset| | 480 // set to the offset from |this| to the first ancestor with a layer. |offset| |
479 // may be NULL. | 481 // may be NULL. |
480 Window* GetAncestorWithLayer(gfx::Vector2d* offset) { | 482 Window* GetAncestorWithLayer(gfx::Vector2d* offset) { |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
541 }; | 543 }; |
542 | 544 |
543 std::map<const void*, Value> prop_map_; | 545 std::map<const void*, Value> prop_map_; |
544 | 546 |
545 DISALLOW_COPY_AND_ASSIGN(Window); | 547 DISALLOW_COPY_AND_ASSIGN(Window); |
546 }; | 548 }; |
547 | 549 |
548 } // namespace aura | 550 } // namespace aura |
549 | 551 |
550 #endif // UI_AURA_WINDOW_H_ | 552 #endif // UI_AURA_WINDOW_H_ |
OLD | NEW |