OLD | NEW |
---|---|
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 CONTENT_PUBLIC_BROWSER_NAVIGATION_CONTROLLER_WEBVIEW_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_NAVIGATION_CONTROLLER_WEBVIEW_H_ |
6 #define CONTENT_PUBLIC_BROWSER_NAVIGATION_CONTROLLER_WEBVIEW_H_ | 6 #define CONTENT_PUBLIC_BROWSER_NAVIGATION_CONTROLLER_WEBVIEW_H_ |
7 | 7 |
8 #include <vector> | |
joth
2012/07/30 19:10:18
not needed
boliu
2012/07/30 21:53:45
Done.
| |
9 | |
10 #include "base/memory/ref_counted_memory.h" | |
11 | |
8 class GURL; | 12 class GURL; |
9 | 13 |
10 namespace content { | 14 namespace content { |
11 | 15 |
12 struct Referrer; | 16 struct Referrer; |
13 | 17 |
14 // An addition to NavigationController with methods required to implement | 18 // An addition to NavigationController with methods required to implement |
15 // Android WebView. | 19 // Android WebView. |
16 // | 20 // |
17 // For the details, please consult the Android developer reference of | 21 // For the details, please consult the Android developer reference of |
18 // the WebView API: | 22 // the WebView API: |
19 // http://developer.android.com/reference/android/webkit/WebView.html | 23 // http://developer.android.com/reference/android/webkit/WebView.html |
20 class NavigationControllerWebView { | 24 class NavigationControllerWebView { |
21 public: | 25 public: |
22 // Loads a 'data:' scheme URL with specified base URL and a history entry URL. | 26 // Loads a 'data:' scheme URL with specified base URL and a history entry URL. |
23 // This is only safe to be used for browser-initiated data: URL navigations, | 27 // This is only safe to be used for browser-initiated data: URL navigations, |
24 // since it shows arbitrary content as if it comes from |history_url|. | 28 // since it shows arbitrary content as if it comes from |history_url|. |
25 virtual void LoadDataWithBaseURL(const GURL& data_url, | 29 virtual void LoadDataWithBaseURL(const GURL& data_url, |
26 const Referrer& referrer, | 30 const Referrer& referrer, |
27 const GURL& base_url, | 31 const GURL& base_url, |
28 const GURL& history_url, | 32 const GURL& history_url, |
29 bool is_overriding_user_agent) = 0; | 33 bool is_overriding_user_agent) = 0; |
34 | |
35 // Used to directly send a http post request with a raw http body provided. | |
36 virtual void PostURL(const GURL& url, | |
37 const content::Referrer& referrer, | |
38 const scoped_refptr<base::RefCountedBytes> http_body, | |
joth
2012/07/30 19:10:18
if we want to use refcountedXxx at all, it should
boliu
2012/07/30 21:53:45
Switch to const& here since it's an input as per t
| |
39 bool is_overriding_user_agent) = 0; | |
30 }; | 40 }; |
31 | 41 |
32 } // namespace content | 42 } // namespace content |
33 | 43 |
34 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_CONTROLLER_WEBVIEW_H_ | 44 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_CONTROLLER_WEBVIEW_H_ |
OLD | NEW |