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 "chrome/browser/ui/webui/options/chromeos/display_overscan_handler.h" | 5 #include "chrome/browser/ui/webui/options/chromeos/display_overscan_handler.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "ash/display/display_controller.h" | 9 #include "ash/display/display_controller.h" |
10 #include "ash/screen_ash.h" | 10 #include "ash/screen_ash.h" |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 | 122 |
123 void DisplayOverscanHandler::HandleCommit(const base::ListValue* unused_args) { | 123 void DisplayOverscanHandler::HandleCommit(const base::ListValue* unused_args) { |
124 if (overscan_calibrator_.get()) { | 124 if (overscan_calibrator_.get()) { |
125 overscan_calibrator_->Commit(); | 125 overscan_calibrator_->Commit(); |
126 overscan_calibrator_.reset(); | 126 overscan_calibrator_.reset(); |
127 } | 127 } |
128 } | 128 } |
129 | 129 |
130 void DisplayOverscanHandler::HandleReset(const base::ListValue* unused_args) { | 130 void DisplayOverscanHandler::HandleReset(const base::ListValue* unused_args) { |
131 if (overscan_calibrator_.get()) | 131 if (overscan_calibrator_.get()) |
132 overscan_calibrator_->UpdateInsets(gfx::Insets()); | 132 overscan_calibrator_->Reset(); |
133 } | 133 } |
134 | 134 |
135 void DisplayOverscanHandler::HandleCancel(const base::ListValue* unused_args) { | 135 void DisplayOverscanHandler::HandleCancel(const base::ListValue* unused_args) { |
136 overscan_calibrator_.reset(); | 136 overscan_calibrator_.reset(); |
137 } | 137 } |
138 | 138 |
139 void DisplayOverscanHandler::HandleMove(const base::ListValue* args) { | 139 void DisplayOverscanHandler::HandleMove(const base::ListValue* args) { |
140 std::string orientation; | 140 std::string orientation; |
141 double length; | 141 double length; |
142 if (!args->GetString(0, &orientation)) { | 142 if (!args->GetString(0, &orientation)) { |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 LOG(ERROR) << "The orientation must be '" << kOrientationHorizontal | 193 LOG(ERROR) << "The orientation must be '" << kOrientationHorizontal |
194 << "' or '" << kOrientationVertical << "': " | 194 << "' or '" << kOrientationVertical << "': " |
195 << orientation; | 195 << orientation; |
196 return; | 196 return; |
197 } | 197 } |
198 overscan_calibrator_->UpdateInsets(insets); | 198 overscan_calibrator_->UpdateInsets(insets); |
199 } | 199 } |
200 | 200 |
201 } // namespace options | 201 } // namespace options |
202 } // namespace chromeos | 202 } // namespace chromeos |
OLD | NEW |