1 // Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights 2 // reserved. Use of this source code is governed by a BSD-style license that can 3 // be found in the LICENSE file. 4 5 #ifndef CEF_LIBCEF_BROWSER_NET_CHROME_SCHEME_HANDLER_H_ 6 #define CEF_LIBCEF_BROWSER_NET_CHROME_SCHEME_HANDLER_H_ 7 #pragma once 8 9 #include <string> 10 11 #include "include/cef_browser.h" 12 #include "include/cef_frame.h" 13 #include "include/cef_process_message.h" 14 15 #include "url/gurl.h" 16 17 namespace base { 18 class ListValue; 19 } 20 21 namespace content { 22 class BrowserURLHandler; 23 } 24 25 namespace url { 26 class Origin; 27 } 28 29 namespace scheme { 30 31 extern const char kChromeURL[]; 32 33 // Register the WebUI controller factory. 34 void RegisterWebUIControllerFactory(); 35 36 // Register the WebUI handler. 37 void BrowserURLHandlerCreated(content::BrowserURLHandler* handler); 38 39 // Returns true if WebUI is allowed to make network requests. 40 bool IsWebUIAllowedToMakeNetworkRequests(const url::Origin& origin); 41 42 } // namespace scheme 43 44 #endif // CEF_LIBCEF_BROWSER_CHROME_SCHEME_HANDLER_H_ 45