-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CL] feat(CEF): CEF integration for Windows, new Chat
- Loading branch information
Showing
49 changed files
with
5,939 additions
and
407 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -223,3 +223,5 @@ cmake-build-debug/ | |
OSS13 Client.exe | ||
OSS13 Server.exe | ||
python*.dll | ||
/Resources/Browser | ||
/External/cef/windows-bin |
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,40 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | ||
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3"> | ||
<assemblyIdentity | ||
type="win32" | ||
name="Contoso.ExampleApplication.ExampleBinary" | ||
version="1.2.3.4" | ||
processorArchitecture="x86" | ||
/> | ||
<description>Contoso Example Application</description> | ||
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1"> | ||
<application> | ||
<!-- Windows 10 --> | ||
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/> | ||
<!-- Windows 8.1 --> | ||
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/> | ||
<!-- Windows 8 --> | ||
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/> | ||
<!-- Windows 7 --> | ||
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/> | ||
<!-- Windows Vista --> | ||
<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/> | ||
</application> | ||
</compatibility> | ||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3"> | ||
<security> | ||
<requestedPrivileges> | ||
<!-- | ||
UAC settings: | ||
- app should run at same integrity level as calling process | ||
- app does not need to manipulate windows belonging to | ||
higher-integrity-level processes | ||
--> | ||
<requestedExecutionLevel | ||
level="asInvoker" | ||
uiAccess="false" | ||
/> | ||
</requestedPrivileges> | ||
</security> | ||
</trustInfo> | ||
</assembly> |
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,23 @@ | ||
#pragma once | ||
|
||
#include <memory> | ||
|
||
#include <SFML/Window/Event.hpp> | ||
|
||
#include <Shared/Geometry/Vec2.hpp> | ||
#include <Shared/IFaces/IFace.h> | ||
|
||
struct Browser : public IFace | ||
{ | ||
// set content in HTML format | ||
virtual void SetContent(const std::string& content) = 0; | ||
|
||
virtual bool OnMouseButtonPressed(sf::Mouse::Button button, uf::vec2i position) = 0; | ||
virtual bool OnMouseButtonReleased(sf::Mouse::Button button, uf::vec2i position) = 0; | ||
virtual bool OnMouseMoved(uf::vec2i position) = 0; | ||
virtual bool OnMouseLeft() = 0; | ||
virtual bool OnMouseWheelScrolled(float delta, uf::vec2i position) = 0; | ||
virtual bool OnKeyPressed(sf::Event::KeyEvent keyEvent) = 0; | ||
virtual bool OnKeyReleased(sf::Event::KeyEvent keyEvent) = 0; | ||
virtual bool OnTextEntered(uint32_t unicodeChar) = 0; | ||
}; |
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,21 @@ | ||
#pragma once | ||
|
||
#include <filesystem> | ||
|
||
#include <Shared/IFaces/IFace.h> | ||
|
||
#include <Browser/Browser.h> | ||
#include <Browser/BrowserUI.h> | ||
|
||
struct BrowserController : public IFace | ||
{ | ||
virtual void Initialize(const std::filesystem::path &executablePath) = 0; | ||
virtual void Update() = 0; | ||
virtual void Shutdown() = 0; | ||
virtual bool CanBeReleased() = 0; | ||
|
||
virtual Browser &CreateBrowser(BrowserUI &ui) = 0; | ||
virtual void CloseBrowser(Browser* browser) = 0; | ||
}; | ||
|
||
std::unique_ptr<BrowserController> CreateBrowserConroller(); |
14 changes: 14 additions & 0 deletions
14
OSS13 Client/Sources/Browser/BrowserControllerHandlers.cpp
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,14 @@ | ||
#include "BrowserControllerHandlers.h" | ||
|
||
#include "BrowserControllerImpl.h" | ||
|
||
BrowserControllerHandlers::BrowserControllerHandlers(BrowserControllerImpl& browserController) : | ||
browserController(browserController) | ||
{ } | ||
|
||
CefRefPtr<CefBrowserProcessHandler> BrowserControllerHandlers::GetBrowserProcessHandler() { | ||
return this; | ||
} | ||
|
||
void BrowserControllerHandlers::OnContextInitialized() | ||
{ } |
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,24 @@ | ||
#pragma once | ||
|
||
#include <cef_app.h> | ||
#include <cef_base.h> | ||
|
||
class BrowserControllerImpl; | ||
|
||
class BrowserControllerHandlers : | ||
public CefApp, | ||
public CefBrowserProcessHandler | ||
{ | ||
public: | ||
BrowserControllerHandlers(BrowserControllerImpl &browserController); | ||
|
||
// CefApp | ||
CefRefPtr<CefBrowserProcessHandler> GetBrowserProcessHandler() final; | ||
|
||
// CefBrowserProcessHandler | ||
void OnContextInitialized() final; | ||
|
||
private: | ||
BrowserControllerImpl& browserController; | ||
IMPLEMENT_REFCOUNTING(BrowserControllerHandlers); | ||
}; |
Oops, something went wrong.