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

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

Issue 593273002: Excludes settings which uses Ash from Athena. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 6 years, 3 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) 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_util.h" 10 #include "ash/screen_util.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 "move", 75 "move",
76 base::Bind(&DisplayOverscanHandler::HandleMove, 76 base::Bind(&DisplayOverscanHandler::HandleMove,
77 base::Unretained(this))); 77 base::Unretained(this)));
78 web_ui()->RegisterMessageCallback( 78 web_ui()->RegisterMessageCallback(
79 "resize", 79 "resize",
80 base::Bind(&DisplayOverscanHandler::HandleResize, 80 base::Bind(&DisplayOverscanHandler::HandleResize,
81 base::Unretained(this))); 81 base::Unretained(this)));
82 } 82 }
83 83
84 void DisplayOverscanHandler::OnDisplayAdded(const gfx::Display& new_display) { 84 void DisplayOverscanHandler::OnDisplayAdded(const gfx::Display& new_display) {
85 if (!overscan_calibrator_)
86 return;
87
85 web_ui()->CallJavascriptFunction( 88 web_ui()->CallJavascriptFunction(
86 "options.DisplayOverscan.onOverscanCanceled"); 89 "options.DisplayOverscan.onOverscanCanceled");
87 } 90 }
88 91
89 void DisplayOverscanHandler::OnDisplayRemoved(const gfx::Display& old_display) { 92 void DisplayOverscanHandler::OnDisplayRemoved(const gfx::Display& old_display) {
93 if (!overscan_calibrator_)
94 return;
95
90 web_ui()->CallJavascriptFunction( 96 web_ui()->CallJavascriptFunction(
91 "options.DisplayOverscan.onOverscanCanceled"); 97 "options.DisplayOverscan.onOverscanCanceled");
92 } 98 }
93 99
94 void DisplayOverscanHandler::OnDisplayMetricsChanged(const gfx::Display&, 100 void DisplayOverscanHandler::OnDisplayMetricsChanged(const gfx::Display&,
95 uint32_t) { 101 uint32_t) {
96 } 102 }
97 103
98 void DisplayOverscanHandler::HandleStart(const base::ListValue* args) { 104 void DisplayOverscanHandler::HandleStart(const base::ListValue* args) {
99 int64 display_id = gfx::Display::kInvalidDisplayID; 105 int64 display_id = gfx::Display::kInvalidDisplayID;
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 LOG(ERROR) << "The orientation must be '" << kOrientationHorizontal 200 LOG(ERROR) << "The orientation must be '" << kOrientationHorizontal
195 << "' or '" << kOrientationVertical << "': " 201 << "' or '" << kOrientationVertical << "': "
196 << orientation; 202 << orientation;
197 return; 203 return;
198 } 204 }
199 overscan_calibrator_->UpdateInsets(insets); 205 overscan_calibrator_->UpdateInsets(insets);
200 } 206 }
201 207
202 } // namespace options 208 } // namespace options
203 } // namespace chromeos 209 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698