mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
- Pass information to the renderer process synchronously on render thread creation and new browser creation to avoid race conditions (issue #744).
- Add the ability to pass extra information to child processes using a new CefBrowserProcessHandler::OnRenderProcessThreadCreated callback (issue #744). - Fix OnBeforeChildProcessLaunch documentation (issue #754). git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@910 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@ -7,28 +7,37 @@
|
||||
#define CEF_LIBCEF_RENDERER_RENDER_PROCESS_OBSERVER_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include "base/memory/ref_counted.h"
|
||||
#include "content/public/renderer/render_process_observer.h"
|
||||
|
||||
struct Cef_CrossOriginWhiteListEntry_Params;
|
||||
|
||||
// This class sends and receives control messages on the renderer process.
|
||||
class CefRenderProcessObserver : public content::RenderProcessObserver {
|
||||
public:
|
||||
CefRenderProcessObserver();
|
||||
virtual ~CefRenderProcessObserver();
|
||||
|
||||
void set_pending_cross_origin_whitelist_entries(
|
||||
const std::vector<Cef_CrossOriginWhiteListEntry_Params>& entries) {
|
||||
pending_cross_origin_whitelist_entries_ = entries;
|
||||
}
|
||||
|
||||
// RenderProcessObserver implementation.
|
||||
virtual bool OnControlMessageReceived(const IPC::Message& message) OVERRIDE;
|
||||
virtual void WebKitInitialized() OVERRIDE;
|
||||
|
||||
private:
|
||||
// Message handlers called on the render thread.
|
||||
void OnModifyCrossOriginWhitelistEntry(bool add,
|
||||
const std::string& source_origin,
|
||||
const std::string& target_protocol,
|
||||
const std::string& target_domain,
|
||||
bool allow_target_subdomains);
|
||||
void OnModifyCrossOriginWhitelistEntry(
|
||||
bool add,
|
||||
const Cef_CrossOriginWhiteListEntry_Params& params);
|
||||
void OnClearCrossOriginWhitelist();
|
||||
|
||||
typedef std::vector<Cef_CrossOriginWhiteListEntry_Params> CrossOriginList;
|
||||
CrossOriginList pending_cross_origin_whitelist_entries_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(CefRenderProcessObserver);
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user