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 #include "ui/aura/root_window_host_linux.h" |
| 6 |
| 7 #include "ui/aura/root_window.h" |
| 8 |
| 9 namespace aura { |
| 10 |
| 11 RootWindowHostLinux::RootWindowHostLinux(const gfx::Rect& bounds) |
| 12 : delegate_(NULL), |
| 13 bounds_(bounds), |
| 14 factory_(new ui::EventFactoryEvdev()) { |
| 15 factory_->CreateEvdevWatchers(); |
| 16 base::MessagePumpLinux::Current()->AddDispatcherForRootWindow(this); |
| 17 } |
| 18 |
| 19 RootWindowHostLinux::~RootWindowHostLinux() { |
| 20 // base::MessagePumpCroid::Current()->SetDefaultDispatcher(0); |
| 21 } |
| 22 |
| 23 bool RootWindowHostLinux::Dispatch(const base::NativeEvent& ne) { |
| 24 ui::TouchEvent* touchev = static_cast<ui::TouchEvent*>(ne); |
| 25 delegate_->OnHostTouchEvent(touchev); |
| 26 return true; |
| 27 } |
| 28 |
| 29 void RootWindowHostLinux::SetDelegate(RootWindowHostDelegate* delegate) { |
| 30 delegate_ = delegate; |
| 31 } |
| 32 |
| 33 RootWindow* RootWindowHostLinux::GetRootWindow() { |
| 34 return delegate_->AsRootWindow(); |
| 35 } |
| 36 |
| 37 gfx::AcceleratedWidget RootWindowHostLinux::GetAcceleratedWidget() { |
| 38 return static_cast<gfx::AcceleratedWidget>(1); |
| 39 } |
| 40 |
| 41 void RootWindowHostLinux::Show() { |
| 42 NOTIMPLEMENTED(); |
| 43 } |
| 44 |
| 45 void RootWindowHostLinux::Hide() { |
| 46 NOTIMPLEMENTED(); |
| 47 } |
| 48 |
| 49 void RootWindowHostLinux::ToggleFullScreen() { |
| 50 NOTIMPLEMENTED(); |
| 51 } |
| 52 |
| 53 gfx::Rect RootWindowHostLinux::GetBounds() const { |
| 54 return bounds_; |
| 55 } |
| 56 |
| 57 void RootWindowHostLinux::SetBounds(const gfx::Rect& bounds) { |
| 58 NOTIMPLEMENTED(); |
| 59 } |
| 60 |
| 61 gfx::Insets RootWindowHostLinux::GetInsets() const { |
| 62 return gfx::Insets(); |
| 63 } |
| 64 |
| 65 void RootWindowHostLinux::SetInsets(const gfx::Insets& insets) { |
| 66 NOTIMPLEMENTED(); |
| 67 } |
| 68 |
| 69 gfx::Point RootWindowHostLinux::GetLocationOnNativeScreen() const { |
| 70 return bounds_.origin(); |
| 71 } |
| 72 |
| 73 void RootWindowHostLinux::SetCapture() { |
| 74 NOTIMPLEMENTED(); |
| 75 } |
| 76 |
| 77 void RootWindowHostLinux::ReleaseCapture() { |
| 78 NOTIMPLEMENTED(); |
| 79 } |
| 80 |
| 81 void RootWindowHostLinux::SetCursor(gfx::NativeCursor cursor) { |
| 82 NOTIMPLEMENTED(); |
| 83 } |
| 84 |
| 85 bool RootWindowHostLinux::QueryMouseLocation(gfx::Point* location_return) { |
| 86 NOTIMPLEMENTED(); |
| 87 return false; |
| 88 } |
| 89 |
| 90 bool RootWindowHostLinux::ConfineCursorToRootWindow() { |
| 91 NOTIMPLEMENTED(); |
| 92 return false; |
| 93 } |
| 94 |
| 95 void RootWindowHostLinux::UnConfineCursor() { |
| 96 NOTIMPLEMENTED(); |
| 97 } |
| 98 |
| 99 void RootWindowHostLinux::OnCursorVisibilityChanged(bool show) { |
| 100 NOTIMPLEMENTED(); |
| 101 } |
| 102 |
| 103 void RootWindowHostLinux::MoveCursorTo(const gfx::Point& location) { |
| 104 NOTIMPLEMENTED(); |
| 105 } |
| 106 |
| 107 void RootWindowHostLinux::SetFocusWhenShown(bool focus_when_shown) { |
| 108 NOTIMPLEMENTED(); |
| 109 } |
| 110 |
| 111 bool RootWindowHostLinux::CopyAreaToSkCanvas(const gfx::Rect& source_bounds, |
| 112 const gfx::Point& dest_offset, |
| 113 SkCanvas* canvas) { |
| 114 NOTIMPLEMENTED(); |
| 115 return false; |
| 116 } |
| 117 |
| 118 bool RootWindowHostLinux::GrabSnapshot( |
| 119 const gfx::Rect& snapshot_bounds, |
| 120 std::vector<unsigned char>* png_representation) { |
| 121 NOTIMPLEMENTED(); |
| 122 return false; |
| 123 } |
| 124 |
| 125 void RootWindowHostLinux::PostNativeEvent( |
| 126 const base::NativeEvent& native_event) { |
| 127 NOTIMPLEMENTED(); |
| 128 } |
| 129 |
| 130 void RootWindowHostLinux::OnDeviceScaleFactorChanged( |
| 131 float device_scale_factor) { |
| 132 NOTIMPLEMENTED(); |
| 133 } |
| 134 |
| 135 void RootWindowHostLinux::PrepareForShutdown() { |
| 136 NOTIMPLEMENTED(); |
| 137 } |
| 138 |
| 139 // static |
| 140 RootWindowHost* RootWindowHost::Create(const gfx::Rect& bounds) { |
| 141 return new RootWindowHostLinux(bounds); |
| 142 } |
| 143 |
| 144 // static |
| 145 gfx::Size RootWindowHost::GetNativeScreenSize() { |
| 146 NOTIMPLEMENTED(); |
| 147 return gfx::Size(); |
| 148 } |
| 149 |
| 150 } // namespace aura |
OLD | NEW |