1 // Copyright 2015 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 "extensions/renderer/scoped_web_frame.h"
7 #include "third_party/WebKit/public/web/WebHeap.h"
11 ScopedWebFrame::ScopedWebFrame() : view_(nullptr), frame_(nullptr) {
12 view_
= blink::WebView::create(nullptr);
13 frame_
= blink::WebLocalFrame::create(
14 blink::WebTreeScopeType::Document
, nullptr);
15 view_
->setMainFrame(frame_
);
18 ScopedWebFrame::~ScopedWebFrame() {
21 blink::WebHeap::collectAllGarbageForTesting();
24 } // namespace extensions