| 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/views/widget/desktop_root_window_host_win.h" |
| 6 |
| 7 #include "ui/aura/root_window.h" |
| 8 #include "ui/views/win/hwnd_message_handler.h" |
| 9 |
| 10 namespace views { |
| 11 |
| 12 //////////////////////////////////////////////////////////////////////////////// |
| 13 // DesktopRootWindowHostWin, public: |
| 14 |
| 15 DesktopRootWindowHostWin::DesktopRootWindowHostWin() |
| 16 : root_window_(NULL), |
| 17 message_handler_(NULL) { |
| 18 } |
| 19 |
| 20 DesktopRootWindowHostWin::~DesktopRootWindowHostWin() { |
| 21 } |
| 22 |
| 23 //////////////////////////////////////////////////////////////////////////////// |
| 24 // DesktopRootWindowHostWin, RootWindowHost implementation: |
| 25 |
| 26 aura::RootWindow* DesktopRootWindowHostWin::GetRootWindow() { |
| 27 return root_window_.get(); |
| 28 } |
| 29 |
| 30 gfx::AcceleratedWidget DesktopRootWindowHostWin::GetAcceleratedWidget() { |
| 31 return message_handler_->hwnd(); |
| 32 } |
| 33 |
| 34 void DesktopRootWindowHostWin::Show() { |
| 35 } |
| 36 |
| 37 void DesktopRootWindowHostWin::Hide() { |
| 38 } |
| 39 |
| 40 void DesktopRootWindowHostWin::ToggleFullScreen() { |
| 41 } |
| 42 |
| 43 gfx::Rect DesktopRootWindowHostWin::GetBounds() const { |
| 44 return gfx::Rect(100, 100); |
| 45 } |
| 46 |
| 47 void DesktopRootWindowHostWin::SetBounds(const gfx::Rect& bounds) { |
| 48 } |
| 49 |
| 50 gfx::Point DesktopRootWindowHostWin::GetLocationOnNativeScreen() const { |
| 51 return gfx::Point(1, 1); |
| 52 } |
| 53 |
| 54 void DesktopRootWindowHostWin::SetCapture() { |
| 55 } |
| 56 |
| 57 void DesktopRootWindowHostWin::ReleaseCapture() { |
| 58 } |
| 59 |
| 60 void DesktopRootWindowHostWin::SetCursor(gfx::NativeCursor cursor) { |
| 61 } |
| 62 |
| 63 void DesktopRootWindowHostWin::ShowCursor(bool show) { |
| 64 } |
| 65 |
| 66 bool DesktopRootWindowHostWin::QueryMouseLocation(gfx::Point* location_return) { |
| 67 return false; |
| 68 } |
| 69 |
| 70 bool DesktopRootWindowHostWin::ConfineCursorToRootWindow() { |
| 71 return false; |
| 72 } |
| 73 |
| 74 void DesktopRootWindowHostWin::UnConfineCursor() { |
| 75 } |
| 76 |
| 77 void DesktopRootWindowHostWin::MoveCursorTo(const gfx::Point& location) { |
| 78 } |
| 79 |
| 80 void DesktopRootWindowHostWin::SetFocusWhenShown(bool focus_when_shown) { |
| 81 } |
| 82 |
| 83 bool DesktopRootWindowHostWin::GrabSnapshot( |
| 84 const gfx::Rect& snapshot_bounds, |
| 85 std::vector<unsigned char>* png_representation) { |
| 86 return false; |
| 87 } |
| 88 |
| 89 void DesktopRootWindowHostWin::PostNativeEvent( |
| 90 const base::NativeEvent& native_event) { |
| 91 } |
| 92 |
| 93 void DesktopRootWindowHostWin::OnDeviceScaleFactorChanged( |
| 94 float device_scale_factor) { |
| 95 } |
| 96 |
| 97 //////////////////////////////////////////////////////////////////////////////// |
| 98 // DesktopRootWindowHostWin, HWNDMessageHandlerDelegate implementation: |
| 99 |
| 100 bool DesktopRootWindowHostWin::IsWidgetWindow() const { |
| 101 return true; |
| 102 } |
| 103 |
| 104 bool DesktopRootWindowHostWin::IsUsingCustomFrame() const { |
| 105 return true; |
| 106 } |
| 107 |
| 108 void DesktopRootWindowHostWin::SchedulePaint() { |
| 109 } |
| 110 |
| 111 void DesktopRootWindowHostWin::EnableInactiveRendering() { |
| 112 } |
| 113 |
| 114 bool DesktopRootWindowHostWin::IsInactiveRenderingDisabled() { |
| 115 return false; |
| 116 } |
| 117 |
| 118 bool DesktopRootWindowHostWin::CanResize() const { |
| 119 return true; |
| 120 } |
| 121 |
| 122 bool DesktopRootWindowHostWin::CanMaximize() const { |
| 123 return true; |
| 124 } |
| 125 |
| 126 bool DesktopRootWindowHostWin::CanActivate() const { |
| 127 return true; |
| 128 } |
| 129 |
| 130 bool DesktopRootWindowHostWin::WidgetSizeIsClientSize() const { |
| 131 return false; |
| 132 } |
| 133 |
| 134 bool DesktopRootWindowHostWin::CanSaveFocus() const { |
| 135 return true; |
| 136 } |
| 137 |
| 138 void DesktopRootWindowHostWin::SaveFocusOnDeactivate() { |
| 139 } |
| 140 |
| 141 void DesktopRootWindowHostWin::RestoreFocusOnActivate() { |
| 142 } |
| 143 |
| 144 void DesktopRootWindowHostWin::RestoreFocusOnEnable() { |
| 145 } |
| 146 |
| 147 bool DesktopRootWindowHostWin::IsModal() const { |
| 148 return false; |
| 149 } |
| 150 |
| 151 int DesktopRootWindowHostWin::GetInitialShowState() const { |
| 152 return ui::SHOW_STATE_NORMAL; |
| 153 } |
| 154 |
| 155 bool DesktopRootWindowHostWin::WillProcessWorkAreaChange() const { |
| 156 return false; |
| 157 } |
| 158 |
| 159 int DesktopRootWindowHostWin::GetNonClientComponent( |
| 160 const gfx::Point& point) const { |
| 161 return HTCLIENT; |
| 162 } |
| 163 |
| 164 void DesktopRootWindowHostWin::GetWindowMask(const gfx::Size& size, |
| 165 gfx::Path* path) { |
| 166 } |
| 167 |
| 168 bool DesktopRootWindowHostWin::GetClientAreaInsets(gfx::Insets* insets) const { |
| 169 return false; |
| 170 } |
| 171 |
| 172 void DesktopRootWindowHostWin::GetMinMaxSize(gfx::Size* min_size, |
| 173 gfx::Size* max_size) const { |
| 174 } |
| 175 |
| 176 gfx::Size DesktopRootWindowHostWin::GetRootViewSize() const { |
| 177 return gfx::Size(100, 100); |
| 178 } |
| 179 |
| 180 void DesktopRootWindowHostWin::ResetWindowControls() { |
| 181 } |
| 182 |
| 183 void DesktopRootWindowHostWin::PaintLayeredWindow(gfx::Canvas* canvas) { |
| 184 } |
| 185 |
| 186 gfx::NativeViewAccessible DesktopRootWindowHostWin::GetNativeViewAccessible() { |
| 187 return NULL; |
| 188 } |
| 189 |
| 190 InputMethod* DesktopRootWindowHostWin::GetInputMethod() { |
| 191 return NULL; |
| 192 } |
| 193 |
| 194 void DesktopRootWindowHostWin::HandleAppDeactivated() { |
| 195 } |
| 196 |
| 197 void DesktopRootWindowHostWin::HandleActivationChanged(bool active) { |
| 198 } |
| 199 |
| 200 bool DesktopRootWindowHostWin::HandleAppCommand(short command) { |
| 201 return false; |
| 202 } |
| 203 |
| 204 void DesktopRootWindowHostWin::HandleCaptureLost() { |
| 205 } |
| 206 |
| 207 void DesktopRootWindowHostWin::HandleClose() { |
| 208 } |
| 209 |
| 210 bool DesktopRootWindowHostWin::HandleCommand(int command) { |
| 211 return false; |
| 212 } |
| 213 |
| 214 void DesktopRootWindowHostWin::HandleAccelerator( |
| 215 const ui::Accelerator& accelerator) { |
| 216 } |
| 217 |
| 218 void DesktopRootWindowHostWin::HandleCreate() { |
| 219 } |
| 220 |
| 221 void DesktopRootWindowHostWin::HandleDestroying() { |
| 222 } |
| 223 |
| 224 void DesktopRootWindowHostWin::HandleDestroyed() { |
| 225 } |
| 226 |
| 227 bool DesktopRootWindowHostWin::HandleInitialFocus() { |
| 228 return false; |
| 229 } |
| 230 |
| 231 void DesktopRootWindowHostWin::HandleDisplayChange() { |
| 232 } |
| 233 |
| 234 void DesktopRootWindowHostWin::HandleBeginWMSizeMove() { |
| 235 } |
| 236 |
| 237 void DesktopRootWindowHostWin::HandleEndWMSizeMove() { |
| 238 } |
| 239 |
| 240 void DesktopRootWindowHostWin::HandleMove() { |
| 241 } |
| 242 |
| 243 void DesktopRootWindowHostWin::HandleWorkAreaChanged() { |
| 244 } |
| 245 |
| 246 void DesktopRootWindowHostWin::HandleVisibilityChanged(bool visible) { |
| 247 } |
| 248 |
| 249 void DesktopRootWindowHostWin::HandleClientSizeChanged( |
| 250 const gfx::Size& new_size) { |
| 251 } |
| 252 |
| 253 void DesktopRootWindowHostWin::HandleFrameChanged() { |
| 254 } |
| 255 |
| 256 void DesktopRootWindowHostWin::HandleNativeFocus(HWND last_focused_window) { |
| 257 } |
| 258 |
| 259 void DesktopRootWindowHostWin::HandleNativeBlur(HWND focused_window) { |
| 260 } |
| 261 |
| 262 bool DesktopRootWindowHostWin::HandleMouseEvent(const ui::MouseEvent& event) { |
| 263 return false; |
| 264 } |
| 265 |
| 266 bool DesktopRootWindowHostWin::HandleKeyEvent(const ui::KeyEvent& event) { |
| 267 return false; |
| 268 } |
| 269 |
| 270 bool DesktopRootWindowHostWin::HandleUntranslatedKeyEvent( |
| 271 const ui::KeyEvent& event) { |
| 272 return false; |
| 273 } |
| 274 |
| 275 bool DesktopRootWindowHostWin::HandleIMEMessage(UINT message, |
| 276 WPARAM w_param, |
| 277 LPARAM l_param, |
| 278 LRESULT* result) { |
| 279 return false; |
| 280 } |
| 281 |
| 282 void DesktopRootWindowHostWin::HandleInputLanguageChange( |
| 283 DWORD character_set, |
| 284 HKL input_language_id) { |
| 285 } |
| 286 |
| 287 bool DesktopRootWindowHostWin::HandlePaintAccelerated( |
| 288 const gfx::Rect& invalid_rect) { |
| 289 return false; |
| 290 } |
| 291 |
| 292 void DesktopRootWindowHostWin::HandlePaint(gfx::Canvas* canvas) { |
| 293 } |
| 294 |
| 295 void DesktopRootWindowHostWin::HandleScreenReaderDetected() { |
| 296 } |
| 297 |
| 298 bool DesktopRootWindowHostWin::HandleTooltipNotify(int w_param, |
| 299 NMHDR* l_param, |
| 300 LRESULT* l_result) { |
| 301 return false; |
| 302 } |
| 303 |
| 304 void DesktopRootWindowHostWin::HandleTooltipMouseMove(UINT message, |
| 305 WPARAM w_param, |
| 306 LPARAM l_param) { |
| 307 } |
| 308 |
| 309 bool DesktopRootWindowHostWin::PreHandleMSG(UINT message, |
| 310 WPARAM w_param, |
| 311 LPARAM l_param, |
| 312 LRESULT* result) { |
| 313 return false; |
| 314 } |
| 315 |
| 316 void DesktopRootWindowHostWin::PostHandleMSG(UINT message, |
| 317 WPARAM w_param, |
| 318 LPARAM l_param) { |
| 319 } |
| 320 |
| 321 //////////////////////////////////////////////////////////////////////////////// |
| 322 // DesktopRootWindowHost, public: |
| 323 |
| 324 // static |
| 325 DesktopRootWindowHost* DesktopRootWindowHost::Create() { |
| 326 return new DesktopRootWindowHostWin; |
| 327 } |
| 328 |
| 329 } // namespace views |
| OLD | NEW |