| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/keyboard/keyboard_controller.h" | 5 #include "ui/keyboard/keyboard_controller.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 gfx::Rect bounds_; | 125 gfx::Rect bounds_; |
| 126 keyboard::KeyboardControllerProxy* proxy_; | 126 keyboard::KeyboardControllerProxy* proxy_; |
| 127 | 127 |
| 128 DISALLOW_COPY_AND_ASSIGN(KeyboardWindowDelegate); | 128 DISALLOW_COPY_AND_ASSIGN(KeyboardWindowDelegate); |
| 129 }; | 129 }; |
| 130 | 130 |
| 131 void ToggleTouchEventLogging(bool enable) { | 131 void ToggleTouchEventLogging(bool enable) { |
| 132 #if defined(OS_CHROMEOS) | 132 #if defined(OS_CHROMEOS) |
| 133 if (!base::SysInfo::IsRunningOnChromeOS()) | 133 if (!base::SysInfo::IsRunningOnChromeOS()) |
| 134 return; | 134 return; |
| 135 CommandLine command( | 135 base::CommandLine command( |
| 136 base::FilePath("/opt/google/touchscreen/toggle_touch_event_logging")); | 136 base::FilePath("/opt/google/touchscreen/toggle_touch_event_logging")); |
| 137 if (enable) | 137 if (enable) |
| 138 command.AppendArg("1"); | 138 command.AppendArg("1"); |
| 139 else | 139 else |
| 140 command.AppendArg("0"); | 140 command.AppendArg("0"); |
| 141 VLOG(1) << "Running " << command.GetCommandLineString(); | 141 VLOG(1) << "Running " << command.GetCommandLineString(); |
| 142 base::LaunchOptions options; | 142 base::LaunchOptions options; |
| 143 options.wait = true; | 143 options.wait = true; |
| 144 base::LaunchProcess(command, options, NULL); | 144 base::LaunchProcess(command, options, NULL); |
| 145 #endif | 145 #endif |
| (...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 564 proxy_->HideKeyboardContainer(container_.get()); | 564 proxy_->HideKeyboardContainer(container_.get()); |
| 565 } | 565 } |
| 566 | 566 |
| 567 void KeyboardController::AddBoundsChangedObserver(aura::Window* window) { | 567 void KeyboardController::AddBoundsChangedObserver(aura::Window* window) { |
| 568 aura::Window* target_window = window ? window->GetToplevelWindow() : nullptr; | 568 aura::Window* target_window = window ? window->GetToplevelWindow() : nullptr; |
| 569 if (target_window) | 569 if (target_window) |
| 570 window_bounds_observer_->AddObservedWindow(target_window); | 570 window_bounds_observer_->AddObservedWindow(target_window); |
| 571 } | 571 } |
| 572 | 572 |
| 573 } // namespace keyboard | 573 } // namespace keyboard |
| OLD | NEW |