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.
5 #include "chrome/renderer/extensions/chrome_v8_extension.h"
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"
12 namespace extensions
{
14 ChromeV8Extension::ChromeV8Extension(Dispatcher
* dispatcher
,
15 ChromeV8Context
* context
)
16 : ObjectBackedNativeHandler(context
),
17 dispatcher_(dispatcher
) {
21 ChromeV8Extension::~ChromeV8Extension() {
24 content::RenderView
* ChromeV8Extension::GetRenderView() {
25 return context() ? context()->GetRenderView() : NULL
;
28 const Extension
* ChromeV8Extension::GetExtensionForRenderView() {
29 return context() ? context()->extension() : NULL
;
32 } // namespace extensions