| OLD | NEW |
| (Empty) |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef SKY_VIEWER_SCRIPT_SCRIPT_RUNNER_H_ | |
| 6 #define SKY_VIEWER_SCRIPT_SCRIPT_RUNNER_H_ | |
| 7 | |
| 8 #include "gin/runner.h" | |
| 9 | |
| 10 namespace blink { | |
| 11 class WebFrame; | |
| 12 } | |
| 13 | |
| 14 namespace sky { | |
| 15 | |
| 16 class ScriptRunner : public gin::Runner { | |
| 17 public: | |
| 18 ScriptRunner(blink::WebFrame*, v8::Handle<v8::Context> context); | |
| 19 ~ScriptRunner(); | |
| 20 | |
| 21 virtual void Run(const std::string& source, | |
| 22 const std::string& resource_name) override; | |
| 23 virtual v8::Handle<v8::Value> Call(v8::Handle<v8::Function> function, | |
| 24 v8::Handle<v8::Value> receiver, | |
| 25 int argc, | |
| 26 v8::Handle<v8::Value> argv[]) override; | |
| 27 virtual gin::ContextHolder* GetContextHolder() override; | |
| 28 | |
| 29 private: | |
| 30 blink::WebFrame* frame_; | |
| 31 gin::ContextHolder* context_holder_; | |
| 32 | |
| 33 DISALLOW_COPY_AND_ASSIGN(ScriptRunner); | |
| 34 }; | |
| 35 | |
| 36 } // namespace sky | |
| 37 | |
| 38 #endif // SKY_VIEWER_SCRIPT_SCRIPT_RUNNER_H_ | |
| OLD | NEW |