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

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

Issue 1995113002: Rename WebUI::CallJavascriptFunction to WebUI::CallJavascriptFunctionUnsafe (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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_manager.h" 9 #include "ash/display/display_manager.h"
10 #include "ash/display/window_tree_host_manager.h" 10 #include "ash/display/window_tree_host_manager.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
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( 84 void DisplayOverscanHandler::OnDisplayAdded(
85 const display::Display& new_display) { 85 const display::Display& new_display) {
86 if (!overscan_calibrator_) 86 if (!overscan_calibrator_)
87 return; 87 return;
88 88
89 web_ui()->CallJavascriptFunction( 89 web_ui()->CallJavascriptFunctionUnsafe(
90 "options.DisplayOverscan.onOverscanCanceled"); 90 "options.DisplayOverscan.onOverscanCanceled");
91 } 91 }
92 92
93 void DisplayOverscanHandler::OnDisplayRemoved( 93 void DisplayOverscanHandler::OnDisplayRemoved(
94 const display::Display& old_display) { 94 const display::Display& old_display) {
95 if (!overscan_calibrator_) 95 if (!overscan_calibrator_)
96 return; 96 return;
97 97
98 web_ui()->CallJavascriptFunction( 98 web_ui()->CallJavascriptFunctionUnsafe(
99 "options.DisplayOverscan.onOverscanCanceled"); 99 "options.DisplayOverscan.onOverscanCanceled");
100 } 100 }
101 101
102 void DisplayOverscanHandler::OnDisplayMetricsChanged(const display::Display&, 102 void DisplayOverscanHandler::OnDisplayMetricsChanged(const display::Display&,
103 uint32_t) {} 103 uint32_t) {}
104 104
105 void DisplayOverscanHandler::HandleStart(const base::ListValue* args) { 105 void DisplayOverscanHandler::HandleStart(const base::ListValue* args) {
106 int64_t display_id = display::Display::kInvalidDisplayID; 106 int64_t display_id = display::Display::kInvalidDisplayID;
107 std::string id_value; 107 std::string id_value;
108 if (!args->GetString(0, &id_value)) { 108 if (!args->GetString(0, &id_value)) {
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 LOG(ERROR) << "The orientation must be '" << kOrientationHorizontal 201 LOG(ERROR) << "The orientation must be '" << kOrientationHorizontal
202 << "' or '" << kOrientationVertical << "': " 202 << "' or '" << kOrientationVertical << "': "
203 << orientation; 203 << orientation;
204 return; 204 return;
205 } 205 }
206 overscan_calibrator_->UpdateInsets(insets); 206 overscan_calibrator_->UpdateInsets(insets);
207 } 207 }
208 208
209 } // namespace options 209 } // namespace options
210 } // namespace chromeos 210 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698