| 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_ROOT_WINDOW_HOST_H_ | 5 #ifndef UI_AURA_ROOT_WINDOW_HOST_H_ |
| 6 #define UI_AURA_ROOT_WINDOW_HOST_H_ | 6 #define UI_AURA_ROOT_WINDOW_HOST_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/event_types.h" | 10 #include "base/event_types.h" |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 // Called when the device scale factor of the root window has chagned. | 145 // Called when the device scale factor of the root window has chagned. |
| 146 virtual void OnDeviceScaleFactorChanged(float device_scale_factor) = 0; | 146 virtual void OnDeviceScaleFactorChanged(float device_scale_factor) = 0; |
| 147 | 147 |
| 148 // Stop listening events in preparation for shutdown. | 148 // Stop listening events in preparation for shutdown. |
| 149 virtual void PrepareForShutdown() = 0; | 149 virtual void PrepareForShutdown() = 0; |
| 150 | 150 |
| 151 protected: | 151 protected: |
| 152 friend class TestScreen; // TODO(beng): see if we can remove/consolidate. | 152 friend class TestScreen; // TODO(beng): see if we can remove/consolidate. |
| 153 | 153 |
| 154 WindowTreeHost(); | 154 WindowTreeHost(); |
| 155 void DestroyCompositor(); |
| 155 | 156 |
| 156 void CreateCompositor(gfx::AcceleratedWidget accelerated_widget); | 157 void CreateCompositor(gfx::AcceleratedWidget accelerated_widget); |
| 157 | 158 |
| 158 // Returns the location of the RootWindow on native screen. | 159 // Returns the location of the RootWindow on native screen. |
| 159 virtual gfx::Point GetLocationOnNativeScreen() const = 0; | 160 virtual gfx::Point GetLocationOnNativeScreen() const = 0; |
| 160 | 161 |
| 161 void NotifyHostResized(const gfx::Size& new_size); | 162 void NotifyHostResized(const gfx::Size& new_size); |
| 162 | 163 |
| 163 WindowTreeHostDelegate* delegate_; | 164 WindowTreeHostDelegate* delegate_; |
| 164 | 165 |
| 165 private: | 166 private: |
| 166 scoped_ptr<ui::Compositor> compositor_; | 167 scoped_ptr<ui::Compositor> compositor_; |
| 167 | 168 |
| 168 scoped_ptr<RootWindowTransformer> transformer_; | 169 scoped_ptr<RootWindowTransformer> transformer_; |
| 169 | 170 |
| 170 DISALLOW_COPY_AND_ASSIGN(WindowTreeHost); | 171 DISALLOW_COPY_AND_ASSIGN(WindowTreeHost); |
| 171 }; | 172 }; |
| 172 | 173 |
| 173 } // namespace aura | 174 } // namespace aura |
| 174 | 175 |
| 175 #endif // UI_AURA_ROOT_WINDOW_HOST_H_ | 176 #endif // UI_AURA_ROOT_WINDOW_HOST_H_ |
| OLD | NEW |