| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #include "ui/aura/desktop.h" | 5 #include "ui/aura/desktop.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 421 } | 421 } |
| 422 | 422 |
| 423 bool Desktop::IsMouseButtonDown() const { | 423 bool Desktop::IsMouseButtonDown() const { |
| 424 return mouse_button_flags_ != 0; | 424 return mouse_button_flags_ != 0; |
| 425 } | 425 } |
| 426 | 426 |
| 427 void Desktop::PostNativeEvent(const base::NativeEvent& native_event) { | 427 void Desktop::PostNativeEvent(const base::NativeEvent& native_event) { |
| 428 host_->PostNativeEvent(native_event); | 428 host_->PostNativeEvent(native_event); |
| 429 } | 429 } |
| 430 | 430 |
| 431 void Desktop::ConvertPointToNativeScreen(gfx::Point* point) const { |
| 432 host_->ConvertPointToNativeScreen(point); |
| 433 } |
| 434 |
| 431 void Desktop::SetCapture(Window* window) { | 435 void Desktop::SetCapture(Window* window) { |
| 432 if (capture_window_ == window) | 436 if (capture_window_ == window) |
| 433 return; | 437 return; |
| 434 | 438 |
| 435 if (capture_window_ && capture_window_->delegate()) | 439 if (capture_window_ && capture_window_->delegate()) |
| 436 capture_window_->delegate()->OnCaptureLost(); | 440 capture_window_->delegate()->OnCaptureLost(); |
| 437 capture_window_ = window; | 441 capture_window_ = window; |
| 438 | 442 |
| 439 if (capture_window_) { | 443 if (capture_window_) { |
| 440 // Make all subsequent mouse events and touch go to the capture window. We | 444 // Make all subsequent mouse events and touch go to the capture window. We |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 625 base::StringToInt(parts[1], &parsed_height) && parsed_height > 0) { | 629 base::StringToInt(parts[1], &parsed_height) && parsed_height > 0) { |
| 626 bounds.set_size(gfx::Size(parsed_width, parsed_height)); | 630 bounds.set_size(gfx::Size(parsed_width, parsed_height)); |
| 627 } else if (use_fullscreen_host_window_) { | 631 } else if (use_fullscreen_host_window_) { |
| 628 bounds = gfx::Rect(DesktopHost::GetNativeDisplaySize()); | 632 bounds = gfx::Rect(DesktopHost::GetNativeDisplaySize()); |
| 629 } | 633 } |
| 630 | 634 |
| 631 return bounds; | 635 return bounds; |
| 632 } | 636 } |
| 633 | 637 |
| 634 } // namespace aura | 638 } // namespace aura |
| OLD | NEW |