| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef CHROME_RENDERER_NATIVE_HANDLER_H_ | 5 #ifndef CHROME_RENDERER_NATIVE_HANDLER_H_ |
| 6 #define CHROME_RENDERER_NATIVE_HANDLER_H_ | 6 #define CHROME_RENDERER_NATIVE_HANDLER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/memory/linked_ptr.h" | 10 #include "base/memory/linked_ptr.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 void RouteFunction(const std::string& name, | 42 void RouteFunction(const std::string& name, |
| 43 const HandlerFunction& handler_function); | 43 const HandlerFunction& handler_function); |
| 44 | 44 |
| 45 void RouteStaticFunction(const std::string& name, | 45 void RouteStaticFunction(const std::string& name, |
| 46 const HandlerFunc handler_func); | 46 const HandlerFunc handler_func); |
| 47 | 47 |
| 48 private: | 48 private: |
| 49 static v8::Handle<v8::Value> Router(const v8::Arguments& args); | 49 static v8::Handle<v8::Value> Router(const v8::Arguments& args); |
| 50 | 50 |
| 51 std::vector<linked_ptr<HandlerFunction> > handler_functions_; | 51 std::vector<linked_ptr<HandlerFunction> > handler_functions_; |
| 52 v8::Handle<v8::ObjectTemplate> object_template_; | 52 v8::Persistent<v8::ObjectTemplate> object_template_; |
| 53 | 53 |
| 54 DISALLOW_COPY_AND_ASSIGN(NativeHandler); | 54 DISALLOW_COPY_AND_ASSIGN(NativeHandler); |
| 55 }; | 55 }; |
| 56 | 56 |
| 57 #endif // CHROME_RENDERER_NATIVE_HANDLER_H_ | 57 #endif // CHROME_RENDERER_NATIVE_HANDLER_H_ |
| OLD | NEW |