// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. #include "CEF/RootWindow.h" #include "include/base/cef_callback_helpers.h" #include "CEF/HumanAppContext.h" #include "CEF/RootWindoManager.h" #include "CEF/MainMessageLoop.h" RootWindowConfig::RootWindowConfig() : always_on_top(false), with_controls(true), with_osr(false), with_extension(false), initially_hidden(false), url(HumanAppContext::Get()->GetMainURL()) {} RootWindow::RootWindow() : delegate_(nullptr) {} RootWindow::~RootWindow() {} // static scoped_refptr RootWindow::GetForBrowser(int browser_id) { RootWindowManager* rootWindowManager = HumanAppContext::Get()->GetRootWindowManager(); return rootWindowManager->GetWindowForBrowser(browser_id); } void RootWindow::OnExtensionsChanged(const ExtensionSet& extensions) { REQUIRE_MAIN_THREAD(); DCHECK(delegate_); DCHECK(!WithExtension()); if (extensions.empty()) return; ExtensionSet::const_iterator it = extensions.begin(); for (; it != extensions.end(); ++it) { delegate_->CreateExtensionWindow(*it, CefRect(), nullptr, base::DoNothing(), WithWindowlessRendering()); } }