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

Side by Side Diff: chrome/browser/ui/webui/options/chromeos/display_overscan_handler.cc

Issue 12505005: Store rotation/ui scale to local state. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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 | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698