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

Side by Side Diff: webkit/glue/webframe.h

Issue 147124: Add notifications for when V8Proxy creates or destroys a V8 Context. (Closed)
Patch Set: roll deps Created 11 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
« no previous file with comments | « chrome/renderer/render_view.cc ('k') | webkit/glue/webframe_impl.h » ('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) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-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 WEBKIT_GLUE_WEBFRAME_H_ 5 #ifndef WEBKIT_GLUE_WEBFRAME_H_
6 #define WEBKIT_GLUE_WEBFRAME_H_ 6 #define WEBKIT_GLUE_WEBFRAME_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/scoped_ptr.h" 10 #include "base/scoped_ptr.h"
11 #include "base/string16.h" 11 #include "base/string16.h"
12 #include "skia/ext/bitmap_platform_device.h" 12 #include "skia/ext/bitmap_platform_device.h"
13 #include "skia/ext/platform_canvas.h" 13 #include "skia/ext/platform_canvas.h"
14 #include "webkit/api/public/WebCommon.h"
14 15
15 class GURL; 16 class GURL;
16 class WebAppCacheContext; 17 class WebAppCacheContext;
17 class WebView; 18 class WebView;
18 class WebTextInput; 19 class WebTextInput;
19 struct NPObject; 20 struct NPObject;
20 21
21 namespace WebKit { 22 namespace WebKit {
22 class WebDataSource; 23 class WebDataSource;
23 class WebForm; 24 class WebForm;
24 class WebHistoryItem; 25 class WebHistoryItem;
25 class WebURLRequest; 26 class WebURLRequest;
26 struct WebConsoleMessage; 27 struct WebConsoleMessage;
27 struct WebFindOptions; 28 struct WebFindOptions;
28 struct WebRect; 29 struct WebRect;
29 struct WebScriptSource; 30 struct WebScriptSource;
30 struct WebSize; 31 struct WebSize;
31 struct WebURLError; 32 struct WebURLError;
32 } 33 }
33 34
35 #if WEBKIT_USING_V8
36 namespace v8 {
37 template <class T> class Local;
38 class Context;
39 }
40 #endif
41
34 // Every frame in a web page is represented by one WebFrame, including the 42 // Every frame in a web page is represented by one WebFrame, including the
35 // outermost frame. 43 // outermost frame.
36 class WebFrame { 44 class WebFrame {
37 public: 45 public:
38 WebFrame() {} 46 WebFrame() {}
39 47
40 // The two functions below retrieve WebFrame instances relating the currently 48 // The two functions below retrieve WebFrame instances relating the currently
41 // executing JavaScript. Since JavaScript can make function calls across 49 // executing JavaScript. Since JavaScript can make function calls across
42 // frames, though, we need to be more precise. 50 // frames, though, we need to be more precise.
43 // 51 //
(...skipping 19 matching lines...) Expand all
63 71
64 virtual void CallJSGC() = 0; 72 virtual void CallJSGC() = 0;
65 73
66 // This grants the currently loaded Document access to all security origins 74 // This grants the currently loaded Document access to all security origins
67 // (including file URLs). Use with care. The access is revoked when a new 75 // (including file URLs). Use with care. The access is revoked when a new
68 // document is loaded into this frame. 76 // document is loaded into this frame.
69 virtual void GrantUniversalAccess() = 0; 77 virtual void GrantUniversalAccess() = 0;
70 78
71 virtual NPObject* GetWindowNPObject() = 0; 79 virtual NPObject* GetWindowNPObject() = 0;
72 80
81 #if WEBKIT_USING_V8
82 // Returns the V8 context for this frame, or an empty handle if there is
83 // none.
84 virtual v8::Local<v8::Context> GetScriptContext() = 0;
85 #endif
86
73 // Loads the given WebURLRequest. 87 // Loads the given WebURLRequest.
74 virtual void LoadRequest(const WebKit::WebURLRequest& request) = 0; 88 virtual void LoadRequest(const WebKit::WebURLRequest& request) = 0;
75 89
76 // Loads the given WebHistoryItem. This corresponds to a back/forward 90 // Loads the given WebHistoryItem. This corresponds to a back/forward
77 // navigation. 91 // navigation.
78 virtual void LoadHistoryItem(const WebKit::WebHistoryItem& item) = 0; 92 virtual void LoadHistoryItem(const WebKit::WebHistoryItem& item) = 0;
79 93
80 // This method is short-hand for calling LoadAlternateHTMLString with a dummy 94 // This method is short-hand for calling LoadAlternateHTMLString with a dummy
81 // request for the given base_url. 95 // request for the given base_url.
82 virtual void LoadHTMLString(const std::string& html_text, 96 virtual void LoadHTMLString(const std::string& html_text,
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 virtual int PendingFrameUnloadEventCount() const = 0; 435 virtual int PendingFrameUnloadEventCount() const = 0;
422 436
423 protected: 437 protected:
424 virtual ~WebFrame() {} 438 virtual ~WebFrame() {}
425 439
426 private: 440 private:
427 DISALLOW_COPY_AND_ASSIGN(WebFrame); 441 DISALLOW_COPY_AND_ASSIGN(WebFrame);
428 }; 442 };
429 443
430 #endif // WEBKIT_GLUE_WEBFRAME_H_ 444 #endif // WEBKIT_GLUE_WEBFRAME_H_
OLDNEW
« no previous file with comments | « chrome/renderer/render_view.cc ('k') | webkit/glue/webframe_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698