OLD | NEW |
| (Empty) |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #include "chrome/renderer/extensions/chrome_v8_extension.h" | |
6 | |
7 #include "base/logging.h" | |
8 #include "chrome/renderer/extensions/chrome_v8_context.h" | |
9 #include "chrome/renderer/extensions/dispatcher.h" | |
10 #include "content/public/renderer/render_view.h" | |
11 | |
12 namespace extensions { | |
13 | |
14 ChromeV8Extension::ChromeV8Extension(Dispatcher* dispatcher, | |
15 ChromeV8Context* context) | |
16 : ObjectBackedNativeHandler(context), | |
17 dispatcher_(dispatcher) { | |
18 CHECK(dispatcher); | |
19 } | |
20 | |
21 ChromeV8Extension::~ChromeV8Extension() { | |
22 } | |
23 | |
24 content::RenderView* ChromeV8Extension::GetRenderView() { | |
25 return context() ? context()->GetRenderView() : NULL; | |
26 } | |
27 | |
28 const Extension* ChromeV8Extension::GetExtensionForRenderView() { | |
29 return context() ? context()->extension() : NULL; | |
30 } | |
31 | |
32 } // namespace extensions | |
OLD | NEW |