| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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_EXTENSIONS_BINDINGS_UTILS_H_ | 5 #ifndef CHROME_RENDERER_EXTENSIONS_BINDINGS_UTILS_H_ |
| 6 #define CHROME_RENDERER_EXTENSIONS_BINDINGS_UTILS_H_ | 6 #define CHROME_RENDERER_EXTENSIONS_BINDINGS_UTILS_H_ |
| 7 | 7 |
| 8 #include "app/resource_bundle.h" | 8 #include "app/resource_bundle.h" |
| 9 #include "base/singleton.h" | 9 #include "base/singleton.h" |
| 10 #include "base/string_piece.h" | 10 #include "base/string_piece.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 } | 21 } |
| 22 std::string resource; | 22 std::string resource; |
| 23 }; | 23 }; |
| 24 | 24 |
| 25 template<int kResourceId> | 25 template<int kResourceId> |
| 26 const char* GetStringResource() { | 26 const char* GetStringResource() { |
| 27 return | 27 return |
| 28 Singleton< StringResourceTemplate<kResourceId> >::get()->resource.c_str(); | 28 Singleton< StringResourceTemplate<kResourceId> >::get()->resource.c_str(); |
| 29 } | 29 } |
| 30 | 30 |
| 31 // Returns the active RenderView, based on which V8 context is active. It is | 31 // Returns the current RenderView, based on which V8 context is current. It is |
| 32 // an error to call this when not in a V8 context. | 32 // an error to call this when not in a V8 context. |
| 33 RenderView* GetActiveRenderView(); | 33 RenderView* GetRenderViewForCurrentContext(); |
| 34 | 34 |
| 35 #endif // CHROME_RENDERER_EXTENSIONS_BINDINGS_UTILS_H_ | 35 #endif // CHROME_RENDERER_EXTENSIONS_BINDINGS_UTILS_H_ |
| OLD | NEW |