Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / extensions / renderer / scoped_web_frame.cc
blob88c4098b5c33348f0773db33e396fdf0a980e353
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"
9 namespace extensions {
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() {
19 view_->close();
20 frame_->close();
21 blink::WebHeap::collectAllGarbageForTesting();
24 } // namespace extensions