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

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

Issue 12087124: Disable touch calibration on external touchscreen. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix Win compilation take 2 + rebase Created 7 years, 10 months 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 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/root_window.h" 5 #include "ui/aura/root_window.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 client->ConvertPointToScreen(root_window, &location_in_screen); 77 client->ConvertPointToScreen(root_window, &location_in_screen);
78 Env::GetInstance()->set_last_mouse_location(location_in_screen); 78 Env::GetInstance()->set_last_mouse_location(location_in_screen);
79 } else { 79 } else {
80 Env::GetInstance()->set_last_mouse_location(location_in_root); 80 Env::GetInstance()->set_last_mouse_location(location_in_root);
81 } 81 }
82 } 82 }
83 83
84 RootWindowHost* CreateHost(RootWindow* root_window, 84 RootWindowHost* CreateHost(RootWindow* root_window,
85 const RootWindow::CreateParams& params) { 85 const RootWindow::CreateParams& params) {
86 RootWindowHost* host = params.host ? 86 RootWindowHost* host = params.host ?
87 params.host : RootWindowHost::Create(params.initial_bounds); 87 params.host : RootWindowHost::Create(params.initial_bounds,
88 params.is_internal_display);
88 host->SetDelegate(root_window); 89 host->SetDelegate(root_window);
89 return host; 90 return host;
90 } 91 }
91 92
92 } // namespace 93 } // namespace
93 94
94 RootWindow::CreateParams::CreateParams(const gfx::Rect& a_initial_bounds) 95 RootWindow::CreateParams::CreateParams(const gfx::Rect& a_initial_bounds,
96 bool a_is_internal_display)
95 : initial_bounds(a_initial_bounds), 97 : initial_bounds(a_initial_bounds),
98 is_internal_display(a_is_internal_display),
96 host(NULL) { 99 host(NULL) {
97 } 100 }
98 101
99 //////////////////////////////////////////////////////////////////////////////// 102 ////////////////////////////////////////////////////////////////////////////////
100 // RootWindow, public: 103 // RootWindow, public:
101 104
102 RootWindow::RootWindow(const CreateParams& params) 105 RootWindow::RootWindow(const CreateParams& params)
103 : Window(NULL), 106 : Window(NULL),
104 ALLOW_THIS_IN_INITIALIZER_LIST(host_(CreateHost(this, params))), 107 ALLOW_THIS_IN_INITIALIZER_LIST(host_(CreateHost(this, params))),
105 ALLOW_THIS_IN_INITIALIZER_LIST(schedule_paint_factory_(this)), 108 ALLOW_THIS_IN_INITIALIZER_LIST(schedule_paint_factory_(this)),
(...skipping 912 matching lines...) Expand 10 before | Expand all | Expand 10 after
1018 // currently broken. See/ crbug.com/107931. 1021 // currently broken. See/ crbug.com/107931.
1019 ui::MouseEvent event(ui::ET_MOUSE_MOVED, 1022 ui::MouseEvent event(ui::ET_MOUSE_MOVED,
1020 orig_mouse_location, 1023 orig_mouse_location,
1021 orig_mouse_location, 1024 orig_mouse_location,
1022 ui::EF_IS_SYNTHESIZED); 1025 ui::EF_IS_SYNTHESIZED);
1023 event.set_system_location(Env::GetInstance()->last_mouse_location()); 1026 event.set_system_location(Env::GetInstance()->last_mouse_location());
1024 OnHostMouseEvent(&event); 1027 OnHostMouseEvent(&event);
1025 } 1028 }
1026 1029
1027 } // namespace aura 1030 } // namespace aura
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698