OLD | NEW |
1 // Copyright 2010 Google Inc. All Rights Reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
2 // Author: ajwong@google.com (Albert Wong) | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
3 | 4 |
4 #include "remoting/client/plugin/chromoting_scriptable_object.h" | 5 #include "remoting/client/plugin/chromoting_scriptable_object.h" |
5 | 6 |
6 #include "remoting/client/client_config.h" | 7 #include "remoting/client/client_config.h" |
7 #include "remoting/client/plugin/chromoting_plugin.h" | 8 #include "remoting/client/plugin/chromoting_instance.h" |
8 | 9 |
9 #include "third_party/ppapi/cpp/var.h" | 10 #include "third_party/ppapi/cpp/var.h" |
10 | 11 |
11 using pp::Var; | 12 using pp::Var; |
12 | 13 |
13 namespace remoting { | 14 namespace remoting { |
14 ChromotingScriptableObject::ChromotingScriptableObject( | 15 ChromotingScriptableObject::ChromotingScriptableObject( |
15 ChromotingPlugin* instance) | 16 ChromotingInstance* instance) |
16 : instance_(instance) { | 17 : instance_(instance) { |
17 } | 18 } |
18 | 19 |
19 ChromotingScriptableObject::~ChromotingScriptableObject() { | 20 ChromotingScriptableObject::~ChromotingScriptableObject() { |
20 } | 21 } |
21 | 22 |
22 void ChromotingScriptableObject::Init() { | 23 void ChromotingScriptableObject::Init() { |
23 // Property addition order should match the interface description at the | 24 // Property addition order should match the interface description at the |
24 // top of chromoting_scriptable_object.h. | 25 // top of chromoting_scriptable_object.h. |
25 AddAttribute("onreadystatechange", Var()); | 26 AddAttribute("onreadystatechange", Var()); |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 return Var(); | 169 return Var(); |
169 } | 170 } |
170 config.auth_token = args[2].AsString(); | 171 config.auth_token = args[2].AsString(); |
171 | 172 |
172 instance_->Connect(config); | 173 instance_->Connect(config); |
173 | 174 |
174 return Var(); | 175 return Var(); |
175 } | 176 } |
176 | 177 |
177 } // namespace remoting | 178 } // namespace remoting |
OLD | NEW |