Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2143)

Unified Diff: chrome/renderer/extensions/dispatcher.h

Issue 23847004: "Redirecting URLs to Packaged Apps" implementation: revised (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed an editing error Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/renderer/extensions/dispatcher.h
diff --git a/chrome/renderer/extensions/dispatcher.h b/chrome/renderer/extensions/dispatcher.h
index 180007651177f1496c4acef55e6a62cee93379bf..4596b4c10f051fe7f0c6c1e451fa907b26fc00c7 100644
--- a/chrome/renderer/extensions/dispatcher.h
+++ b/chrome/renderer/extensions/dispatcher.h
@@ -20,6 +20,8 @@
#include "content/public/renderer/render_process_observer.h"
#include "extensions/common/event_filter.h"
#include "extensions/common/features/feature.h"
+#include "third_party/WebKit/public/web/WebNavigationPolicy.h"
+#include "third_party/WebKit/public/web/WebNavigationType.h"
#include "v8/include/v8.h"
class ChromeRenderViewTest;
@@ -32,6 +34,7 @@ struct ExtensionMsg_Loaded_Params;
namespace WebKit {
class WebFrame;
class WebSecurityOrigin;
+class WebURLRequest;
}
namespace base {
@@ -132,6 +135,15 @@ class Dispatcher : public content::RenderProcessObserver {
const base::ListValue& args,
bool user_gesture);
+ // For top-level navigations, tries to find a platform app that has registered
+ // url_handlers matching the URL. If found, delegates further URL processing
+ // to the browser (the browser is supposed to launch the app), and returns
+ // true. Otherwise, returns false.
+ bool MaybeRedirectUrlToApp(WebKit::WebFrame* frame,
+ const WebKit::WebURLRequest& request,
+ WebKit::WebNavigationType type,
+ WebKit::WebNavigationPolicy default_policy);
+
private:
friend class ::ChromeRenderViewTest;
FRIEND_TEST_ALL_PREFIXES(RendererPermissionsPolicyDelegateTest,

Powered by Google App Engine
This is Rietveld 408576698