-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added process message handlers and code to call them on both sides
- Loading branch information
Showing
8 changed files
with
115 additions
and
0 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
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 @@ | ||
// Copyright © 2010-2015 The CefSharp Authors. All rights reserved. | ||
// | ||
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. | ||
|
||
#pragma once | ||
|
||
#include "include/cef_base.h" | ||
|
||
namespace CefSharp | ||
{ | ||
namespace Internals | ||
{ | ||
namespace Messaging | ||
{ | ||
//contains process message names for all handled messages | ||
|
||
//Message containing a script to be evaluated | ||
const CefString kEvaluateJavascript = "EvaluateJavascript"; | ||
//Message containing the result for a given evaluation | ||
const CefString kEvaluateJavascriptDone = "EvaluateJavascriptDone"; | ||
} | ||
} | ||
} |
32 changes: 32 additions & 0 deletions
32
CefSharp.Core/Internals/Messaging/ProcessMessageDelegate.h
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,32 @@ | ||
// Copyright © 2010-2015 The CefSharp Authors. All rights reserved. | ||
// | ||
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. | ||
|
||
#pragma once | ||
|
||
#include <set> | ||
|
||
#include "include\cef_base.h" | ||
#include "include\cef_app.h" | ||
|
||
namespace CefSharp | ||
{ | ||
namespace Internals | ||
{ | ||
namespace Messaging | ||
{ | ||
//Specific process message handler classes can inherit from this one | ||
class ProcessMessageDelegate : public virtual CefBase | ||
{ | ||
public: | ||
//Will be called for uhandled received process messages. | ||
//Returns false if message wasn't handled, true if it was | ||
virtual bool OnProcessMessageReceived(CefRefPtr<CefBrowser> browser, CefProcessId source_process, CefRefPtr<CefProcessMessage> message) = 0; | ||
|
||
IMPLEMENT_REFCOUNTING(ProcessMessageDelegate); | ||
}; | ||
|
||
typedef std::set<CefRefPtr<ProcessMessageDelegate>> ProcessMessageDelegateSet; | ||
} | ||
} | ||
} |