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

Side by Side Diff: content/components/navigation_interception/intercept_navigation_delegate.h

Issue 11293017: Move navigation interception component to content/components (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add findbugs suppression for compatibility code. Created 8 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_COMPONENT_NAVIGATION_INTERCEPTION_INTERCEPT_NAVIGATION_DE LEGATE_H_ 5 #ifndef CONTENT_COMPONENTS_NAVIGATION_INTERCEPTION_INTERCEPT_NAVIGATION_DELEGATE _H_
6 #define CHROME_BROWSER_COMPONENT_NAVIGATION_INTERCEPTION_INTERCEPT_NAVIGATION_DE LEGATE_H_ 6 #define CONTENT_COMPONENTS_NAVIGATION_INTERCEPTION_INTERCEPT_NAVIGATION_DELEGATE _H_
7 7
8 #include "base/android/jni_helper.h" 8 #include "base/android/jni_helper.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/supports_user_data.h" 10 #include "base/supports_user_data.h"
11 11
12 class GURL; 12 class GURL;
13 13
14 namespace content { 14 namespace content {
15 class ResourceThrottle; 15 class ResourceThrottle;
16 class WebContents; 16 class WebContents;
17 } 17 }
18 18
19 namespace net { 19 namespace net {
20 class URLRequest; 20 class URLRequest;
21 } 21 }
22 22
23 namespace navigation_interception { 23 namespace content {
24 24
25 // Native side of the InterceptNavigationDelegate Java interface. 25 // Native side of the InterceptNavigationDelegate Java interface.
26 // This is used to create a InterceptNavigationResourceThrottle that calls the 26 // This is used to create a InterceptNavigationResourceThrottle that calls the
27 // Java interface method to determine whether a navigation should be ignored or 27 // Java interface method to determine whether a navigation should be ignored or
28 // not. 28 // not.
29 // To us this class: 29 // To us this class:
30 // 1) the Java-side interface implementation must be associated (via the 30 // 1) the Java-side interface implementation must be associated (via the
31 // Associate method) with a WebContents for which URLRequests are to be 31 // Associate method) with a WebContents for which URLRequests are to be
32 // intercepted, 32 // intercepted,
33 // 2) the ResourceThrottle obtained via CreateThrottleFor must be associated 33 // 2) the ResourceThrottle obtained via CreateThrottleFor must be associated
(...skipping 20 matching lines...) Expand all
54 net::URLRequest* request); 54 net::URLRequest* request);
55 55
56 virtual bool ShouldIgnoreNavigation(const GURL& url, 56 virtual bool ShouldIgnoreNavigation(const GURL& url,
57 bool has_user_gesture); 57 bool has_user_gesture);
58 private: 58 private:
59 JavaObjectWeakGlobalRef weak_jdelegate_; 59 JavaObjectWeakGlobalRef weak_jdelegate_;
60 }; 60 };
61 61
62 bool RegisterInterceptNavigationDelegate(JNIEnv* env); 62 bool RegisterInterceptNavigationDelegate(JNIEnv* env);
63 63
64 } // namespace navigation_interception 64 } // namespace content
65 65
66 #endif // CHROME_BROWSER_COMPONENT_NAVIGATION_INTERCEPTION_INTERCEPT_NAVIGATION _DELEGATE_H_ 66 #endif // CONTENT_COMPONENTS_NAVIGATION_INTERCEPTION_INTERCEPT_NAVIGATION_DELEG ATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698