cef/tests/cefclient/client_popup_handler.cpp
Marshall Greenblatt 1073577d03 Make CEF compliant with Google/Chromium style (issue #473).
- Add a new check_style tool based on Google's cpplint that can be used to verify compliance of pending changes and specific files/directories.
- Update existing CEF source code to be compliant with the style requirements.

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@463 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
2012-01-09 23:46:23 +00:00

31 lines
1018 B
C++

// Copyright (c) 2011 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 "cefclient/client_popup_handler.h"
#include "include/cef_frame.h"
#include "cefclient/util.h"
ClientPopupHandler::ClientPopupHandler(CefRefPtr<CefBrowser> parentBrowser)
: m_ParentBrowser(parentBrowser) {
ASSERT(m_ParentBrowser.get());
}
ClientPopupHandler::~ClientPopupHandler() {
}
bool ClientPopupHandler::OnBeforeBrowse(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,
CefRefPtr<CefRequest> request,
NavType navType,
bool isRedirect) {
REQUIRE_UI_THREAD();
// Load the request in the parent browser window.
m_ParentBrowser->GetMainFrame()->LoadRequest(request);
browser->CloseBrowser();
m_ParentBrowser = NULL;
return true;
}