Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(341)

Side by Side Diff: ui/aura/desktop.cc

Issue 8585015: Implement ui_controls for aura (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: no mask for xsendevent Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/aura/desktop.h ('k') | ui/aura/desktop_host.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 414 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 } 425 }
426 426
427 bool Desktop::IsMouseButtonDown() const { 427 bool Desktop::IsMouseButtonDown() const {
428 return mouse_button_flags_ != 0; 428 return mouse_button_flags_ != 0;
429 } 429 }
430 430
431 void Desktop::PostNativeEvent(const base::NativeEvent& native_event) { 431 void Desktop::PostNativeEvent(const base::NativeEvent& native_event) {
432 host_->PostNativeEvent(native_event); 432 host_->PostNativeEvent(native_event);
433 } 433 }
434 434
435 void Desktop::ConvertPointToNativeScreen(gfx::Point* point) const {
436 gfx::Point location = host_->GetLocationOnNativeScreen();
437 point->Offset(location.x(), location.y());
438 }
439
435 void Desktop::SetCapture(Window* window) { 440 void Desktop::SetCapture(Window* window) {
436 if (capture_window_ == window) 441 if (capture_window_ == window)
437 return; 442 return;
438 443
439 if (capture_window_ && capture_window_->delegate()) 444 if (capture_window_ && capture_window_->delegate())
440 capture_window_->delegate()->OnCaptureLost(); 445 capture_window_->delegate()->OnCaptureLost();
441 capture_window_ = window; 446 capture_window_ = window;
442 447
443 if (capture_window_) { 448 if (capture_window_) {
444 // Make all subsequent mouse events and touch go to the capture window. We 449 // 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
629 base::StringToInt(parts[1], &parsed_height) && parsed_height > 0) { 634 base::StringToInt(parts[1], &parsed_height) && parsed_height > 0) {
630 bounds.set_size(gfx::Size(parsed_width, parsed_height)); 635 bounds.set_size(gfx::Size(parsed_width, parsed_height));
631 } else if (use_fullscreen_host_window_) { 636 } else if (use_fullscreen_host_window_) {
632 bounds = gfx::Rect(DesktopHost::GetNativeDisplaySize()); 637 bounds = gfx::Rect(DesktopHost::GetNativeDisplaySize());
633 } 638 }
634 639
635 return bounds; 640 return bounds;
636 } 641 }
637 642
638 } // namespace aura 643 } // namespace aura
OLDNEW
« no previous file with comments | « ui/aura/desktop.h ('k') | ui/aura/desktop_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698