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

Unified Diff: remoting/client/plugin/chromoting_scriptable_object.cc

Issue 8985007: Refactoring of the client-side input pipeline and scaling dimension management. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 9 years 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 side-by-side diff with in-line comments
Download patch
Index: remoting/client/plugin/chromoting_scriptable_object.cc
diff --git a/remoting/client/plugin/chromoting_scriptable_object.cc b/remoting/client/plugin/chromoting_scriptable_object.cc
index 218c3c99af2dc440dbc4535c091beb9fb9bd29f5..11855709a669ca44d7706b64e800eb7c56d1a94e 100644
--- a/remoting/client/plugin/chromoting_scriptable_object.cc
+++ b/remoting/client/plugin/chromoting_scriptable_object.cc
@@ -103,9 +103,11 @@ void ChromotingScriptableObject::Init() {
AddMethod("connect", &ChromotingScriptableObject::DoConnect);
AddMethod("disconnect", &ChromotingScriptableObject::DoDisconnect);
- AddMethod("setScaleToFit", &ChromotingScriptableObject::DoSetScaleToFit);
AddMethod("onIq", &ChromotingScriptableObject::DoOnIq);
AddMethod("releaseAllKeys", &ChromotingScriptableObject::DoReleaseAllKeys);
+
+ // Older versions of the web app expect a setScaleToFit method.
+ AddMethod("setScaleToFit", &ChromotingScriptableObject::DoNothing);
}
bool ChromotingScriptableObject::HasProperty(const Var& name, Var* exception) {
@@ -410,20 +412,8 @@ Var ChromotingScriptableObject::DoDisconnect(const std::vector<Var>& args,
return Var();
}
-Var ChromotingScriptableObject::DoSetScaleToFit(const std::vector<Var>& args,
- Var* exception) {
- if (args.size() != 1) {
- *exception = Var("Usage: setScaleToFit(scale_to_fit)");
- return Var();
- }
-
- if (!args[0].is_bool()) {
- *exception = Var("scale_to_fit must be a boolean.");
- return Var();
- }
-
- VLOG(1) << "Setting scale-to-fit.";
- instance_->SetScaleToFit(args[0].AsBool());
+Var ChromotingScriptableObject::DoNothing(const std::vector<Var>& args,
+ Var* exception) {
return Var();
}

Powered by Google App Engine
This is Rietveld 408576698