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

Side by Side Diff: chrome/renderer/extensions/bindings_utils.cc

Issue 164458: Land http://codereview.chromium.org/159067: (Closed)
Patch Set: undo docs Created 11 years, 4 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
« no previous file with comments | « chrome/common/view_types.h ('k') | chrome/renderer/extensions/extension_process_bindings.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) 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 #include "chrome/renderer/extensions/bindings_utils.h" 5 #include "chrome/renderer/extensions/bindings_utils.h"
6 6
7 #include "base/string_util.h" 7 #include "base/string_util.h"
8 #include "chrome/renderer/render_view.h" 8 #include "chrome/renderer/render_view.h"
9 #include "webkit/api/public/WebFrame.h" 9 #include "webkit/api/public/WebFrame.h"
10 10
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 } 61 }
62 62
63 return contexts; 63 return contexts;
64 } 64 }
65 65
66 ContextList::iterator FindContext(v8::Handle<v8::Context> context) { 66 ContextList::iterator FindContext(v8::Handle<v8::Context> context) {
67 ContextList& all_contexts = GetContexts(); 67 ContextList& all_contexts = GetContexts();
68 68
69 ContextList::iterator it = all_contexts.begin(); 69 ContextList::iterator it = all_contexts.begin();
70 for (; it != all_contexts.end(); ++it) { 70 for (; it != all_contexts.end(); ++it) {
71 if ((*it)->context == context) 71 if ((*it)->context == context)
72 break; 72 break;
73 } 73 }
74 74
75 return it; 75 return it;
76 } 76 }
77 77
78 PendingRequestMap& GetPendingRequestMap() { 78 PendingRequestMap& GetPendingRequestMap() {
79 return Singleton<SingletonData>::get()->pending_requests; 79 return Singleton<SingletonData>::get()->pending_requests;
80 } 80 }
81 81
82 RenderView* GetRenderViewForCurrentContext() { 82 RenderView* GetRenderViewForCurrentContext() {
(...skipping 30 matching lines...) Expand all
113 NOTREACHED(); 113 NOTREACHED();
114 return; 114 return;
115 } 115 }
116 116
117 v8::Local<v8::Function> function = v8::Local<v8::Function>::Cast(value); 117 v8::Local<v8::Function> function = v8::Local<v8::Function>::Cast(value);
118 if (!function.IsEmpty()) 118 if (!function.IsEmpty())
119 function->Call(v8::Object::New(), argc, argv); 119 function->Call(v8::Object::New(), argc, argv);
120 } 120 }
121 121
122 } // namespace bindings_utils 122 } // namespace bindings_utils
OLDNEW
« no previous file with comments | « chrome/common/view_types.h ('k') | chrome/renderer/extensions/extension_process_bindings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698