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

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

Issue 10025007: Convert tabs, windows, and extension APIs to feature system. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: blah 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
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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 template<class T> 42 template<class T>
43 static T* GetFromArguments(const v8::Arguments& args) { 43 static T* GetFromArguments(const v8::Arguments& args) {
44 CHECK(!args.Data().IsEmpty()); 44 CHECK(!args.Data().IsEmpty());
45 T* result = static_cast<T*>(args.Data().As<v8::External>()->Value()); 45 T* result = static_cast<T*>(args.Data().As<v8::External>()->Value());
46 return result; 46 return result;
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
53 // event dispatch. The URL might not have been committed yet and might not
54 // be an extension URL.
55 const ::Extension* GetExtensionForCurrentRenderView() const;
56
57 // Returns the chromeHidden object for the current context. 52 // Returns the chromeHidden object for the current context.
58 static v8::Handle<v8::Value> GetChromeHidden(const v8::Arguments& args); 53 static v8::Handle<v8::Value> GetChromeHidden(const v8::Arguments& args);
59 54
60 ExtensionDispatcher* extension_dispatcher_; 55 ExtensionDispatcher* extension_dispatcher_;
61 56
62 private: 57 private:
63 DISALLOW_COPY_AND_ASSIGN(ChromeV8Extension); 58 DISALLOW_COPY_AND_ASSIGN(ChromeV8Extension);
64 }; 59 };
65 60
66 #endif // CHROME_RENDERER_EXTENSIONS_CHROME_V8_EXTENSION_H_ 61 #endif // CHROME_RENDERER_EXTENSIONS_CHROME_V8_EXTENSION_H_
OLDNEW
« no previous file with comments | « chrome/renderer/extensions/api_definitions_natives.cc ('k') | chrome/renderer/extensions/chrome_v8_extension.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698