2012-10-08 19:47:37 +02:00
|
|
|
// Copyright (c) 2012 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.
|
|
|
|
|
2015-11-26 03:53:12 +01:00
|
|
|
#ifndef CEF_LIBCEF_BROWSER_NET_CHROME_SCHEME_HANDLER_H_
|
|
|
|
#define CEF_LIBCEF_BROWSER_NET_CHROME_SCHEME_HANDLER_H_
|
2012-10-08 19:47:37 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <string>
|
2013-03-12 21:23:24 +01:00
|
|
|
|
2012-10-18 00:45:49 +02:00
|
|
|
#include "include/cef_browser.h"
|
2012-10-08 19:47:37 +02:00
|
|
|
#include "include/cef_frame.h"
|
2012-10-18 00:45:49 +02:00
|
|
|
#include "include/cef_process_message.h"
|
2013-03-12 21:23:24 +01:00
|
|
|
|
|
|
|
#include "net/url_request/url_request_job_factory.h"
|
2013-07-24 22:15:18 +02:00
|
|
|
#include "url/gurl.h"
|
2012-10-08 19:47:37 +02:00
|
|
|
|
2012-10-18 00:45:49 +02:00
|
|
|
namespace base {
|
|
|
|
class ListValue;
|
|
|
|
}
|
|
|
|
|
2012-10-08 19:47:37 +02:00
|
|
|
namespace content {
|
2016-11-07 20:14:09 +01:00
|
|
|
class BrowserURLHandler;
|
2012-10-08 19:47:37 +02:00
|
|
|
}
|
|
|
|
|
2015-03-02 21:25:14 +01:00
|
|
|
class CefURLRequestManager;
|
|
|
|
|
2012-10-08 19:47:37 +02:00
|
|
|
namespace scheme {
|
|
|
|
|
|
|
|
extern const char kChromeURL[];
|
|
|
|
|
|
|
|
// Register the chrome scheme handler.
|
2015-03-02 21:25:14 +01:00
|
|
|
void RegisterChromeHandler(CefURLRequestManager* request_manager);
|
2012-10-08 19:47:37 +02:00
|
|
|
|
2016-11-07 20:14:09 +01:00
|
|
|
// Register the WebUI controller factory.
|
|
|
|
void RegisterWebUIControllerFactory();
|
|
|
|
|
|
|
|
// Register the WebUI handler.
|
|
|
|
void BrowserURLHandlerCreated(content::BrowserURLHandler* handler);
|
2012-10-08 19:47:37 +02:00
|
|
|
|
|
|
|
// Used to fire any asynchronous content updates.
|
2017-05-17 11:29:28 +02:00
|
|
|
void DidFinishChromeLoad(CefRefPtr<CefFrame> frame, const GURL& validated_url);
|
2012-10-08 19:47:37 +02:00
|
|
|
|
2013-03-12 21:23:24 +01:00
|
|
|
// Create a new ProtocolHandler that will filter the URLs passed to the default
|
|
|
|
// "chrome" protocol handler and forward the rest to CEF's handler.
|
2016-04-27 22:38:52 +02:00
|
|
|
std::unique_ptr<net::URLRequestJobFactory::ProtocolHandler>
|
2013-03-12 21:23:24 +01:00
|
|
|
WrapChromeProtocolHandler(
|
2015-03-02 21:25:14 +01:00
|
|
|
CefURLRequestManager* request_manager,
|
2016-04-27 22:38:52 +02:00
|
|
|
std::unique_ptr<net::URLRequestJobFactory::ProtocolHandler>
|
2013-03-12 21:23:24 +01:00
|
|
|
chrome_protocol_handler);
|
|
|
|
|
2012-10-08 19:47:37 +02:00
|
|
|
} // namespace scheme
|
|
|
|
|
|
|
|
#endif // CEF_LIBCEF_BROWSER_CHROME_SCHEME_HANDLER_H_
|