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

Side by Side Diff: ui/aura/test/test_window_delegate.h

Issue 1057873004: Pass a ui::PaintContext from ui::Layer to layer delegates. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: layer-paintcontext: mac Created 5 years, 8 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/aura/demo/demo_main.cc ('k') | ui/aura/test/test_window_delegate.cc » ('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_AURA_TEST_TEST_WINDOW_DELEGATE_H_ 5 #ifndef UI_AURA_TEST_TEST_WINDOW_DELEGATE_H_
6 #define UI_AURA_TEST_TEST_WINDOW_DELEGATE_H_ 6 #define UI_AURA_TEST_TEST_WINDOW_DELEGATE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 void OnBoundsChanged(const gfx::Rect& old_bounds, 48 void OnBoundsChanged(const gfx::Rect& old_bounds,
49 const gfx::Rect& new_bounds) override; 49 const gfx::Rect& new_bounds) override;
50 ui::TextInputClient* GetFocusedTextInputClient() override; 50 ui::TextInputClient* GetFocusedTextInputClient() override;
51 gfx::NativeCursor GetCursor(const gfx::Point& point) override; 51 gfx::NativeCursor GetCursor(const gfx::Point& point) override;
52 int GetNonClientComponent(const gfx::Point& point) const override; 52 int GetNonClientComponent(const gfx::Point& point) const override;
53 bool ShouldDescendIntoChildForEventHandling( 53 bool ShouldDescendIntoChildForEventHandling(
54 Window* child, 54 Window* child,
55 const gfx::Point& location) override; 55 const gfx::Point& location) override;
56 bool CanFocus() override; 56 bool CanFocus() override;
57 void OnCaptureLost() override; 57 void OnCaptureLost() override;
58 void OnPaint(gfx::Canvas* canvas) override; 58 void OnPaint(const ui::PaintContext& context) override;
59 void OnDeviceScaleFactorChanged(float device_scale_factor) override; 59 void OnDeviceScaleFactorChanged(float device_scale_factor) override;
60 void OnWindowDestroying(Window* window) override; 60 void OnWindowDestroying(Window* window) override;
61 void OnWindowDestroyed(Window* window) override; 61 void OnWindowDestroyed(Window* window) override;
62 void OnWindowTargetVisibilityChanged(bool visible) override; 62 void OnWindowTargetVisibilityChanged(bool visible) override;
63 bool HasHitTestMask() const override; 63 bool HasHitTestMask() const override;
64 void GetHitTestMask(gfx::Path* mask) const override; 64 void GetHitTestMask(gfx::Path* mask) const override;
65 65
66 private: 66 private:
67 int window_component_; 67 int window_component_;
68 bool delete_on_destroyed_; 68 bool delete_on_destroyed_;
(...skipping 10 matching lines...) Expand all
79 class ColorTestWindowDelegate : public TestWindowDelegate { 79 class ColorTestWindowDelegate : public TestWindowDelegate {
80 public: 80 public:
81 explicit ColorTestWindowDelegate(SkColor color); 81 explicit ColorTestWindowDelegate(SkColor color);
82 ~ColorTestWindowDelegate() override; 82 ~ColorTestWindowDelegate() override;
83 83
84 ui::KeyboardCode last_key_code() const { return last_key_code_; } 84 ui::KeyboardCode last_key_code() const { return last_key_code_; }
85 85
86 // Overridden from TestWindowDelegate: 86 // Overridden from TestWindowDelegate:
87 void OnKeyEvent(ui::KeyEvent* event) override; 87 void OnKeyEvent(ui::KeyEvent* event) override;
88 void OnWindowDestroyed(Window* window) override; 88 void OnWindowDestroyed(Window* window) override;
89 void OnPaint(gfx::Canvas* canvas) override; 89 void OnPaint(const ui::PaintContext& context) override;
90 90
91 private: 91 private:
92 SkColor color_; 92 SkColor color_;
93 ui::KeyboardCode last_key_code_; 93 ui::KeyboardCode last_key_code_;
94 94
95 DISALLOW_COPY_AND_ASSIGN(ColorTestWindowDelegate); 95 DISALLOW_COPY_AND_ASSIGN(ColorTestWindowDelegate);
96 }; 96 };
97 97
98 // A simple WindowDelegate that has a hit-test mask. 98 // A simple WindowDelegate that has a hit-test mask.
99 class MaskedWindowDelegate : public TestWindowDelegate { 99 class MaskedWindowDelegate : public TestWindowDelegate {
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 int key_release_count_; 145 int key_release_count_;
146 int gesture_count_; 146 int gesture_count_;
147 147
148 DISALLOW_COPY_AND_ASSIGN(EventCountDelegate); 148 DISALLOW_COPY_AND_ASSIGN(EventCountDelegate);
149 }; 149 };
150 150
151 } // namespace test 151 } // namespace test
152 } // namespace aura 152 } // namespace aura
153 153
154 #endif // UI_AURA_TEST_TEST_WINDOW_DELEGATE_H_ 154 #endif // UI_AURA_TEST_TEST_WINDOW_DELEGATE_H_
OLDNEW
« no previous file with comments | « ui/aura/demo/demo_main.cc ('k') | ui/aura/test/test_window_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698