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

Side by Side Diff: chrome/renderer/native_handler.h

Issue 9835039: Make app_custom_bindings.js lazily evaluated so it doesn't execute on every page load. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 9 months 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/renderer/module_system_unittest.cc ('k') | chrome/renderer/native_handler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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_
OLDNEW
« no previous file with comments | « chrome/renderer/module_system_unittest.cc ('k') | chrome/renderer/native_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698