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

Side by Side Diff: chrome/renderer/extensions/event_bindings.h

Issue 164225: Switch to WebFrame from the WebKit API.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' 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 | Annotate | Revision Log
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 #ifndef CHROME_RENDERER_EXTENSIONS_EVENT_BINDINGS_H_ 5 #ifndef CHROME_RENDERER_EXTENSIONS_EVENT_BINDINGS_H_
6 #define CHROME_RENDERER_EXTENSIONS_EVENT_BINDINGS_H_ 6 #define CHROME_RENDERER_EXTENSIONS_EVENT_BINDINGS_H_
7 7
8 #include <string>
9
8 #include "v8/include/v8.h" 10 #include "v8/include/v8.h"
9 11
10 #include <string>
11
12 class RenderThreadBase; 12 class RenderThreadBase;
13 class RenderView; 13 class RenderView;
14
15 namespace WebKit {
14 class WebFrame; 16 class WebFrame;
17 }
15 18
16 // This class deals with the javascript bindings related to Event objects. 19 // This class deals with the javascript bindings related to Event objects.
17 class EventBindings { 20 class EventBindings {
18 public: 21 public:
19 static const char* kName; // The v8::Extension name, for dependencies. 22 static const char* kName; // The v8::Extension name, for dependencies.
20 static v8::Extension* Get(); 23 static v8::Extension* Get();
21 24
22 // Allow RenderThread to be mocked out. 25 // Allow RenderThread to be mocked out.
23 static void SetRenderThread(RenderThreadBase* thread); 26 static void SetRenderThread(RenderThreadBase* thread);
24 static RenderThreadBase* GetRenderThread(); 27 static RenderThreadBase* GetRenderThread();
25 28
26 // Handle a script context coming / going away. 29 // Handle a script context coming / going away.
27 static void HandleContextCreated(WebFrame* frame, bool content_script); 30 static void HandleContextCreated(WebKit::WebFrame* frame,
28 static void HandleContextDestroyed(WebFrame* frame); 31 bool content_script);
32 static void HandleContextDestroyed(WebKit::WebFrame* frame);
29 33
30 // Calls the given function in each registered context which is listening for 34 // Calls the given function in each registered context which is listening for
31 // events. If render_view is non-NULL, only call the function in contexts 35 // events. If render_view is non-NULL, only call the function in contexts
32 // belonging to that view. See comments on 36 // belonging to that view. See comments on
33 // bindings_utils::CallFunctionInContext for more details. 37 // bindings_utils::CallFunctionInContext for more details.
34 static void CallFunction(const std::string& function_name, int argc, 38 static void CallFunction(const std::string& function_name, int argc,
35 v8::Handle<v8::Value>* argv, 39 v8::Handle<v8::Value>* argv,
36 RenderView* render_view); 40 RenderView* render_view);
37 }; 41 };
38 42
39 #endif // CHROME_RENDERER_EXTENSIONS_EVENT_BINDINGS_H_ 43 #endif // CHROME_RENDERER_EXTENSIONS_EVENT_BINDINGS_H_
OLDNEW
« no previous file with comments | « chrome/renderer/extensions/bindings_utils.cc ('k') | chrome/renderer/extensions/event_bindings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698