Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
https://github.com/MTASZTAKI/ApertusVR/issues/59
Signed-off-by: Peter Kovacs <peter.kovacs@sztaki.mta.hu>
- Loading branch information
Peter Kovacs
committed
Nov 30, 2017
1 parent
64b4af3
commit 365609d
Showing
8 changed files
with
127 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/*MIT License | ||
Copyright (c) 2016 MTA SZTAKI | ||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE.*/ | ||
|
||
#include "ApeCefLifeSpanHandlerImpl.h" | ||
|
||
Ape::CefLifeSpanHandlerImpl::CefLifeSpanHandlerImpl() | ||
{ | ||
|
||
} | ||
|
||
Ape::CefLifeSpanHandlerImpl::~CefLifeSpanHandlerImpl() | ||
{ | ||
|
||
} | ||
|
||
void Ape::CefLifeSpanHandlerImpl::OnAfterCreated(CefRefPtr<CefBrowser> browser) | ||
{ | ||
|
||
} | ||
|
||
bool Ape::CefLifeSpanHandlerImpl::OnBeforePopup(CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame, const CefString & target_url, | ||
const CefString & target_frame_name, WindowOpenDisposition target_disposition, bool user_gesture, const CefPopupFeatures & popupFeatures, | ||
CefWindowInfo & windowInfo, CefRefPtr<CefClient>& client, CefBrowserSettings & settings, bool * no_javascript_access) | ||
{ | ||
windowInfo.SetAsWindowless(0); | ||
//target_disposition = WindowOpenDisposition::WOD_CURRENT_TAB; | ||
browser->GetMainFrame()->LoadURL(target_url); | ||
//std::cout << "Ape:::CefLifeSpanHandlerImpl::OnBeforePopup " << turl << " id:" << browser->GetIdentifier() << std::endl; | ||
return false; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
/*MIT License | ||
Copyright (c) 2016 MTA SZTAKI | ||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE.*/ | ||
|
||
#ifndef APE_CEFLIFESPANHANDLERIMPL_H | ||
#define APE_CEFLIFESPANHANDLERIMPL_H | ||
|
||
#include <iostream> | ||
#include <string> | ||
#include <thread> | ||
#include "cef_app.h" | ||
#include "cef_client.h" | ||
#include "cef_life_span_handler.h" | ||
#include "ApeIManualTexture.h" | ||
|
||
namespace Ape | ||
{ | ||
class CefLifeSpanHandlerImpl : public CefLifeSpanHandler | ||
{ | ||
public: | ||
CefLifeSpanHandlerImpl(); | ||
|
||
~CefLifeSpanHandlerImpl(); | ||
|
||
void OnAfterCreated(CefRefPtr<CefBrowser> browser) override; | ||
|
||
bool OnBeforePopup(CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame, const CefString& target_url, const CefString& target_frame_name, | ||
WindowOpenDisposition target_disposition, bool user_gesture, const CefPopupFeatures& popupFeatures, CefWindowInfo& windowInfo, CefRefPtr<CefClient>& client, | ||
CefBrowserSettings& settings, bool* no_javascript_access) override; | ||
|
||
IMPLEMENT_REFCOUNTING(CefLifeSpanHandlerImpl); | ||
}; | ||
} | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters