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

Side by Side Diff: android_webview/browser/aw_contents_io_thread_client.h

Issue 11348075: [Android WebView] AwContentsClient.shouldCreate window callback part 2. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address Marcin's comments. 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 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
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 // Notifies registered observers when an AwIoThreadClient is registerd
47 // for the specified |child_id| and |route_id|. Invoked on the thread
48 // that the Observer was registered on.
49 class ReadyObserver {
50 public:
51 virtual void OnIoThreadClientReady(int child_id, int route_id) = 0;
joth 2012/11/16 21:52:57 protected virtual d'tor.
benm (inactive) 2012/11/28 20:00:05 Done.
52 };
53
54 // Add/remove an observer that will be notified as AwIoThreadClients
55 // are registered.
56 static void AddReadyObserver(ReadyObserver* obs);
57 static void RemoveReadyObserver(ReadyObserver* obs);
joth 2012/11/16 21:52:57 document which thread these must be called on, and
benm (inactive) 2012/11/28 20:00:05 Would do, but I think I'm going to go with your su
58
46 // This method is called on the IO thread only. 59 // This method is called on the IO thread only.
47 virtual scoped_ptr<InterceptedRequestData> ShouldInterceptRequest( 60 virtual scoped_ptr<InterceptedRequestData> ShouldInterceptRequest(
48 const GURL& location, 61 const GURL& location,
49 const net::URLRequest* request) = 0; 62 const net::URLRequest* request) = 0;
50 63
51 // Retrieve the AllowContentAccess setting value of this AwContents. 64 // Retrieve the AllowContentAccess setting value of this AwContents.
52 // This method is called on the IO thread only. 65 // This method is called on the IO thread only.
53 virtual bool ShouldBlockContentUrls() const = 0; 66 virtual bool ShouldBlockContentUrls() const = 0;
54 67
55 // Retrieve the AllowFileAccess setting value of this AwContents. 68 // Retrieve the AllowFileAccess setting value of this AwContents.
56 // This method is called on the IO thread only. 69 // This method is called on the IO thread only.
57 virtual bool ShouldBlockFileUrls() const = 0; 70 virtual bool ShouldBlockFileUrls() const = 0;
58 71
59 // Retrieve the BlockNetworkLoads setting value of this AwContents. 72 // Retrieve the BlockNetworkLoads setting value of this AwContents.
60 // This method is called on the IO thread only. 73 // This method is called on the IO thread only.
61 virtual bool ShouldBlockNetworkLoads() const = 0; 74 virtual bool ShouldBlockNetworkLoads() const = 0;
62 }; 75 };
63 76
64 } // namespace android_webview 77 } // namespace android_webview
65 78
66 #endif // ANDROID_WEBVIEW_BROWSER_AW_CONTENTS_IO_THREAD_CLIENT_H_ 79 #endif // ANDROID_WEBVIEW_BROWSER_AW_CONTENTS_IO_THREAD_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698