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 ANDROID_WEBVIEW_BROWSER_AW_CONTENTS_IO_THREAD_CLIENT_H_ | 5 #ifndef ANDROID_WEBVIEW_BROWSER_AW_CONTENTS_IO_THREAD_CLIENT_H_ |
6 #define ANDROID_WEBVIEW_BROWSER_AW_CONTENTS_IO_THREAD_CLIENT_H_ | 6 #define ANDROID_WEBVIEW_BROWSER_AW_CONTENTS_IO_THREAD_CLIENT_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 | 9 |
10 class GURL; | 10 class GURL; |
(...skipping 25 matching lines...) Expand all Loading... | |
36 public: | 36 public: |
37 virtual ~AwContentsIoThreadClient() {} | 37 virtual ~AwContentsIoThreadClient() {} |
38 | 38 |
39 // This will attempt to fetch the AwContentsIoThreadClient for the given | 39 // This will attempt to fetch the AwContentsIoThreadClient for the given |
40 // |render_process_id|, |render_view_id| pair. | 40 // |render_process_id|, |render_view_id| pair. |
41 // This method can be called from any thread. | 41 // This method can be called from any thread. |
42 // An empty scoped_ptr is a valid return value. | 42 // An empty scoped_ptr is a valid return value. |
43 static scoped_ptr<AwContentsIoThreadClient> FromID(int render_process_id, | 43 static scoped_ptr<AwContentsIoThreadClient> FromID(int render_process_id, |
44 int render_view_id); | 44 int render_view_id); |
45 | 45 |
46 class ReadyObserver { | |
joth
2012/11/16 06:24:31
docs
benm (inactive)
2012/11/16 12:29:09
Done.
| |
47 public: | |
48 virtual void OnIoThreadClientReady(int child_id, int route_id) = 0; | |
49 }; | |
50 | |
mkosiba (inactive)
2012/11/16 12:28:32
I think the usual pattern is to declare ReadyObser
benm (inactive)
2012/11/16 12:36:31
Do you have a precedent? I had a quick look at som
mkosiba (inactive)
2012/11/16 13:55:18
I got the idea from WebContentsObserver being frie
benm (inactive)
2012/11/16 14:00:26
OK, thanks. think i will leave as is then.
| |
51 static void AddReadyObserver(ReadyObserver* obs); | |
52 static void RemoveReadyObserver(ReadyObserver* obs); | |
53 | |
46 // This method is called on the IO thread only. | 54 // This method is called on the IO thread only. |
47 virtual scoped_ptr<InterceptedRequestData> ShouldInterceptRequest( | 55 virtual scoped_ptr<InterceptedRequestData> ShouldInterceptRequest( |
48 const GURL& location, | 56 const GURL& location, |
49 const net::URLRequest* request) = 0; | 57 const net::URLRequest* request) = 0; |
50 | 58 |
51 // Retrieve the AllowContentAccess setting value of this AwContents. | 59 // Retrieve the AllowContentAccess setting value of this AwContents. |
52 // This method is called on the IO thread only. | 60 // This method is called on the IO thread only. |
53 virtual bool ShouldBlockContentUrls() const = 0; | 61 virtual bool ShouldBlockContentUrls() const = 0; |
54 | 62 |
55 // Retrieve the AllowFileAccess setting value of this AwContents. | 63 // Retrieve the AllowFileAccess setting value of this AwContents. |
56 // This method is called on the IO thread only. | 64 // This method is called on the IO thread only. |
57 virtual bool ShouldBlockFileUrls() const = 0; | 65 virtual bool ShouldBlockFileUrls() const = 0; |
58 | 66 |
59 // Retrieve the BlockNetworkLoads setting value of this AwContents. | 67 // Retrieve the BlockNetworkLoads setting value of this AwContents. |
60 // This method is called on the IO thread only. | 68 // This method is called on the IO thread only. |
61 virtual bool ShouldBlockNetworkLoads() const = 0; | 69 virtual bool ShouldBlockNetworkLoads() const = 0; |
62 }; | 70 }; |
63 | 71 |
64 } // namespace android_webview | 72 } // namespace android_webview |
65 | 73 |
66 #endif // ANDROID_WEBVIEW_BROWSER_AW_CONTENTS_IO_THREAD_CLIENT_H_ | 74 #endif // ANDROID_WEBVIEW_BROWSER_AW_CONTENTS_IO_THREAD_CLIENT_H_ |
OLD | NEW |