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

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

Issue 9903010: Extract ExtensionRequestSender from SchemaGeneratedBindings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix bug Created 8 years, 8 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/chrome_renderer.gypi ('k') | chrome/renderer/extensions/chrome_v8_extension.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_EXTENSIONS_CHROME_V8_EXTENSION_H_ 5 #ifndef CHROME_RENDERER_EXTENSIONS_CHROME_V8_EXTENSION_H_
6 #define CHROME_RENDERER_EXTENSIONS_CHROME_V8_EXTENSION_H_ 6 #define CHROME_RENDERER_EXTENSIONS_CHROME_V8_EXTENSION_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/linked_ptr.h" 10 #include "base/memory/linked_ptr.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 } 47 }
48 48
49 // Gets the render view for the current v8 context. 49 // Gets the render view for the current v8 context.
50 static content::RenderView* GetCurrentRenderView(); 50 static content::RenderView* GetCurrentRenderView();
51 51
52 // Note: do not call this function before or during the chromeHidden.onLoad 52 // Note: do not call this function before or during the chromeHidden.onLoad
53 // event dispatch. The URL might not have been committed yet and might not 53 // event dispatch. The URL might not have been committed yet and might not
54 // be an extension URL. 54 // be an extension URL.
55 const ::Extension* GetExtensionForCurrentRenderView() const; 55 const ::Extension* GetExtensionForCurrentRenderView() const;
56 56
57 // Checks that the current context contains an extension that has permission
58 // to execute the specified function. If it does not, a v8 exception is thrown
59 // and the method returns false. Otherwise returns true.
60 bool CheckCurrentContextAccessToExtensionAPI(
61 const std::string& function_name) const;
62
63 // Returns the chromeHidden object for the current context. 57 // Returns the chromeHidden object for the current context.
64 static v8::Handle<v8::Value> GetChromeHidden(const v8::Arguments& args); 58 static v8::Handle<v8::Value> GetChromeHidden(const v8::Arguments& args);
65 59
66 ExtensionDispatcher* extension_dispatcher_; 60 ExtensionDispatcher* extension_dispatcher_;
67 61
68 private: 62 private:
69 DISALLOW_COPY_AND_ASSIGN(ChromeV8Extension); 63 DISALLOW_COPY_AND_ASSIGN(ChromeV8Extension);
70 }; 64 };
71 65
72 #endif // CHROME_RENDERER_EXTENSIONS_CHROME_V8_EXTENSION_H_ 66 #endif // CHROME_RENDERER_EXTENSIONS_CHROME_V8_EXTENSION_H_
OLDNEW
« no previous file with comments | « chrome/chrome_renderer.gypi ('k') | chrome/renderer/extensions/chrome_v8_extension.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698