| 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/message_loop.h" | 10 #include "base/message_loop.h" |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 gfx::AcceleratedWidget accelerated_widget); | 41 gfx::AcceleratedWidget accelerated_widget); |
| 42 | 42 |
| 43 // Sets the RootWindow this RootWindowHost is hosting. RootWindowHost does not | 43 // Sets the RootWindow this RootWindowHost is hosting. RootWindowHost does not |
| 44 // own the RootWindow. | 44 // own the RootWindow. |
| 45 virtual void SetRootWindow(RootWindow* root_window) = 0; | 45 virtual void SetRootWindow(RootWindow* root_window) = 0; |
| 46 virtual RootWindow* GetRootWindow() = 0; | 46 virtual RootWindow* GetRootWindow() = 0; |
| 47 | 47 |
| 48 // Returns the accelerated widget. | 48 // Returns the accelerated widget. |
| 49 virtual gfx::AcceleratedWidget GetAcceleratedWidget() = 0; | 49 virtual gfx::AcceleratedWidget GetAcceleratedWidget() = 0; |
| 50 | 50 |
| 51 // Returns the accelerated widget used for event processing. |
| 52 virtual gfx::AcceleratedWidget GetAcceleratedWidgetUsedForEvents() = 0; |
| 53 |
| 51 // Shows the RootWindowHost. | 54 // Shows the RootWindowHost. |
| 52 virtual void Show() = 0; | 55 virtual void Show() = 0; |
| 53 | 56 |
| 54 // Toggles the host's full screen state. | 57 // Toggles the host's full screen state. |
| 55 virtual void ToggleFullScreen() = 0; | 58 virtual void ToggleFullScreen() = 0; |
| 56 | 59 |
| 57 // Gets/Sets the size of the RootWindowHost. | 60 // Gets/Sets the size of the RootWindowHost. |
| 58 virtual gfx::Rect GetBounds() const = 0; | 61 virtual gfx::Rect GetBounds() const = 0; |
| 59 virtual void SetBounds(const gfx::Rect& bounds) = 0; | 62 virtual void SetBounds(const gfx::Rect& bounds) = 0; |
| 60 | 63 |
| (...skipping 30 matching lines...) Expand all Loading... |
| 91 | 94 |
| 92 // Grabs the snapshot of the root window by using the platform-dependent APIs. | 95 // Grabs the snapshot of the root window by using the platform-dependent APIs. |
| 93 // The bounds need to be in physical pixels. | 96 // The bounds need to be in physical pixels. |
| 94 virtual bool GrabSnapshot( | 97 virtual bool GrabSnapshot( |
| 95 const gfx::Rect& snapshot_bounds, | 98 const gfx::Rect& snapshot_bounds, |
| 96 std::vector<unsigned char>* png_representation) = 0; | 99 std::vector<unsigned char>* png_representation) = 0; |
| 97 | 100 |
| 98 // Posts |native_event| to the platform's event queue. | 101 // Posts |native_event| to the platform's event queue. |
| 99 #if !defined(OS_MACOSX) | 102 #if !defined(OS_MACOSX) |
| 100 virtual void PostNativeEvent(const base::NativeEvent& native_event) = 0; | 103 virtual void PostNativeEvent(const base::NativeEvent& native_event) = 0; |
| 104 virtual bool DispatchNativeEvent(const base::NativeEvent& native_event) = 0; |
| 101 #endif | 105 #endif |
| 102 | 106 |
| 103 // Called when the device scale factor of the root window has chagned. | 107 // Called when the device scale factor of the root window has chagned. |
| 104 virtual void OnDeviceScaleFactorChanged(float device_scale_factor) = 0; | 108 virtual void OnDeviceScaleFactorChanged(float device_scale_factor) = 0; |
| 105 }; | 109 }; |
| 106 | 110 |
| 107 } // namespace aura | 111 } // namespace aura |
| 108 | 112 |
| 109 #endif // UI_AURA_ROOT_WINDOW_HOST_H_ | 113 #endif // UI_AURA_ROOT_WINDOW_HOST_H_ |
| OLD | NEW |