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

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

Issue 10704073: Plumb listenerIDs correctly for events that clobber chrome.Event.prototype.dispatch. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 5 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/extensions/extension_dispatcher.cc ('k') | chrome/renderer/module_system.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_MODULE_SYSTEM_H_ 5 #ifndef CHROME_RENDERER_MODULE_SYSTEM_H_
6 #define CHROME_RENDERER_MODULE_SYSTEM_H_ 6 #define CHROME_RENDERER_MODULE_SYSTEM_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/memory/linked_ptr.h" 9 #include "base/memory/linked_ptr.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 DISALLOW_COPY_AND_ASSIGN(NativesEnabledScope); 50 DISALLOW_COPY_AND_ASSIGN(NativesEnabledScope);
51 }; 51 };
52 52
53 // |source_map| is a weak pointer. 53 // |source_map| is a weak pointer.
54 explicit ModuleSystem(v8::Handle<v8::Context> context, SourceMap* source_map); 54 explicit ModuleSystem(v8::Handle<v8::Context> context, SourceMap* source_map);
55 virtual ~ModuleSystem(); 55 virtual ~ModuleSystem();
56 56
57 // Returns true if the current context has a ModuleSystem installed in it. 57 // Returns true if the current context has a ModuleSystem installed in it.
58 static bool IsPresentInCurrentContext(); 58 static bool IsPresentInCurrentContext();
59 59
60 // Dumps the given exception message to LOG(ERROR). 60 // Dumps the debug info from |try_catch| to LOG(ERROR).
61 static void DumpException(v8::Handle<v8::Message> message); 61 static void DumpException(const v8::TryCatch& try_catch);
62 62
63 // Require the specified module. This is the equivalent of calling 63 // Require the specified module. This is the equivalent of calling
64 // require('module_name') from the loaded JS files. 64 // require('module_name') from the loaded JS files.
65 void Require(const std::string& module_name); 65 void Require(const std::string& module_name);
66 v8::Handle<v8::Value> Require(const v8::Arguments& args); 66 v8::Handle<v8::Value> Require(const v8::Arguments& args);
67 v8::Handle<v8::Value> RequireForJs(const v8::Arguments& args); 67 v8::Handle<v8::Value> RequireForJs(const v8::Arguments& args);
68 v8::Handle<v8::Value> RequireForJsInner(v8::Handle<v8::String> module_name); 68 v8::Handle<v8::Value> RequireForJsInner(v8::Handle<v8::String> module_name);
69 69
70 // Register |native_handler| as a potential target for requireNative(), so 70 // Register |native_handler| as a potential target for requireNative(), so
71 // calls to requireNative(|name|) from JS will return a new object created by 71 // calls to requireNative(|name|) from JS will return a new object created by
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 // When 0, natives are disabled, otherwise indicates how many callers have 131 // When 0, natives are disabled, otherwise indicates how many callers have
132 // pinned natives as enabled. 132 // pinned natives as enabled.
133 int natives_enabled_; 133 int natives_enabled_;
134 134
135 std::set<std::string> overridden_native_handlers_; 135 std::set<std::string> overridden_native_handlers_;
136 136
137 DISALLOW_COPY_AND_ASSIGN(ModuleSystem); 137 DISALLOW_COPY_AND_ASSIGN(ModuleSystem);
138 }; 138 };
139 139
140 #endif // CHROME_RENDERER_MODULE_SYSTEM_H_ 140 #endif // CHROME_RENDERER_MODULE_SYSTEM_H_
OLDNEW
« no previous file with comments | « chrome/renderer/extensions/extension_dispatcher.cc ('k') | chrome/renderer/module_system.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698