OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef UI_AURA_REMOTE_ROOT_WINDOW_HOST_WIN_H_ |
| 6 #define UI_AURA_REMOTE_ROOT_WINDOW_HOST_WIN_H_ |
| 7 |
| 8 #include <vector> |
| 9 |
| 10 #include "base/compiler_specific.h" |
| 11 #include "ui/aura/root_window_host.h" |
| 12 #include "ui/base/win/window_impl.h" |
| 13 |
| 14 namespace ui { |
| 15 class ViewProp; |
| 16 } |
| 17 |
| 18 namespace aura { |
| 19 // RootWindowHost implementaton that receives events from a different process. |
| 20 class AURA_EXPORT RemoteRootWindowHostWin : public RootWindowHost { |
| 21 public: |
| 22 static RemoteRootWindowHostWin* Instance(); |
| 23 static RemoteRootWindowHostWin* Create(const gfx::Rect& bounds); |
| 24 |
| 25 void OnMouseMoved(int x, int y, int extra); |
| 26 void OnMouseClick(int x, int y, int extra); |
| 27 |
| 28 private: |
| 29 RemoteRootWindowHostWin(const gfx::Rect& bounds); |
| 30 virtual ~RemoteRootWindowHostWin(); |
| 31 |
| 32 // RootWindowHost overrides: |
| 33 virtual void SetDelegate(RootWindowHostDelegate* delegate) OVERRIDE; |
| 34 virtual RootWindow* GetRootWindow() OVERRIDE; |
| 35 virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE; |
| 36 virtual void Show() OVERRIDE; |
| 37 virtual void Hide() OVERRIDE; |
| 38 virtual void ToggleFullScreen() OVERRIDE; |
| 39 virtual gfx::Rect GetBounds() const OVERRIDE; |
| 40 virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE; |
| 41 virtual gfx::Point GetLocationOnNativeScreen() const OVERRIDE; |
| 42 virtual void SetCapture() OVERRIDE; |
| 43 virtual void ReleaseCapture() OVERRIDE; |
| 44 virtual void SetCursor(gfx::NativeCursor cursor) OVERRIDE; |
| 45 virtual void ShowCursor(bool show) OVERRIDE; |
| 46 virtual bool QueryMouseLocation(gfx::Point* location_return) OVERRIDE; |
| 47 virtual bool ConfineCursorToRootWindow() OVERRIDE; |
| 48 virtual void UnConfineCursor() OVERRIDE; |
| 49 virtual void MoveCursorTo(const gfx::Point& location) OVERRIDE; |
| 50 virtual void SetFocusWhenShown(bool focus_when_shown) OVERRIDE; |
| 51 virtual bool GrabSnapshot( |
| 52 const gfx::Rect& snapshot_bounds, |
| 53 std::vector<unsigned char>* png_representation) OVERRIDE; |
| 54 virtual void PostNativeEvent(const base::NativeEvent& native_event) OVERRIDE; |
| 55 virtual void OnDeviceScaleFactorChanged(float device_scale_factor) OVERRIDE; |
| 56 virtual void PrepareForShutdown() OVERRIDE; |
| 57 |
| 58 RootWindowHostDelegate* delegate_; |
| 59 scoped_ptr<ui::ViewProp> prop_; |
| 60 |
| 61 DISALLOW_COPY_AND_ASSIGN(RemoteRootWindowHostWin); |
| 62 }; |
| 63 |
| 64 } // namespace aura |
| 65 |
| 66 #endif // UI_AURA_REMOTE_ROOT_WINDOW_HOST_WIN_H_ |
| 67 |
OLD | NEW |