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

Side by Side Diff: content/public/browser/content_browser_client.h

Issue 2726523002: Pass Callback to TaskRunner by value and consume it on invocation (1) (Closed)
Patch Set: erase Closure* Created 3 years, 8 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 unified diff | Download patch
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 CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_
6 #define CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ 6 #define CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <map> 10 #include <map>
11 #include <memory> 11 #include <memory>
12 #include <string> 12 #include <string>
13 #include <utility> 13 #include <utility>
14 #include <vector> 14 #include <vector>
15 15
16 #include "base/callback_forward.h" 16 #include "base/callback.h"
17 #include "base/task_scheduler/task_scheduler.h" 17 #include "base/task_scheduler/task_scheduler.h"
18 #include "base/values.h" 18 #include "base/values.h"
19 #include "build/build_config.h" 19 #include "build/build_config.h"
20 #include "content/public/browser/certificate_request_result_type.h" 20 #include "content/public/browser/certificate_request_result_type.h"
21 #include "content/public/browser/navigation_throttle.h" 21 #include "content/public/browser/navigation_throttle.h"
22 #include "content/public/common/content_client.h" 22 #include "content/public/common/content_client.h"
23 #include "content/public/common/media_stream_request.h" 23 #include "content/public/common/media_stream_request.h"
24 #include "content/public/common/resource_type.h" 24 #include "content/public/common/resource_type.h"
25 #include "content/public/common/service_info.h" 25 #include "content/public/common/service_info.h"
26 #include "content/public/common/socket_permission_request.h" 26 #include "content/public/common/socket_permission_request.h"
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 const MainFunctionParams& parameters); 153 const MainFunctionParams& parameters);
154 154
155 // Allows the embedder to change the default behavior of 155 // Allows the embedder to change the default behavior of
156 // BrowserThread::PostAfterStartupTask to better match whatever 156 // BrowserThread::PostAfterStartupTask to better match whatever
157 // definition of "startup" the embedder has in mind. This may be 157 // definition of "startup" the embedder has in mind. This may be
158 // called on any thread. 158 // called on any thread.
159 // Note: see related BrowserThread::PostAfterStartupTask. 159 // Note: see related BrowserThread::PostAfterStartupTask.
160 virtual void PostAfterStartupTask( 160 virtual void PostAfterStartupTask(
161 const tracked_objects::Location& from_here, 161 const tracked_objects::Location& from_here,
162 const scoped_refptr<base::TaskRunner>& task_runner, 162 const scoped_refptr<base::TaskRunner>& task_runner,
163 const base::Closure& task); 163 base::Closure task);
164 164
165 // Allows the embedder to indicate whether it considers startup to be 165 // Allows the embedder to indicate whether it considers startup to be
166 // complete. May be called on any thread. This should be called on a one-off 166 // complete. May be called on any thread. This should be called on a one-off
167 // basis; if you need to poll this function constantly, use the above 167 // basis; if you need to poll this function constantly, use the above
168 // PostAfterStartupTask() API instead. 168 // PostAfterStartupTask() API instead.
169 virtual bool IsBrowserStartupComplete(); 169 virtual bool IsBrowserStartupComplete();
170 170
171 // If content creates the WebContentsView implementation, it will ask the 171 // If content creates the WebContentsView implementation, it will ask the
172 // embedder to return an (optional) delegate to customize it. The view will 172 // embedder to return an (optional) delegate to customize it. The view will
173 // own the delegate. 173 // own the delegate.
(...skipping 654 matching lines...) Expand 10 before | Expand all | Expand 10 after
828 virtual bool ShouldRedirectDOMStorageTaskRunner(); 828 virtual bool ShouldRedirectDOMStorageTaskRunner();
829 829
830 // If this returns true, all BrowserThreads (but UI/IO) that support it on 830 // If this returns true, all BrowserThreads (but UI/IO) that support it on
831 // this platform will experimentally be redirected to TaskScheduler. 831 // this platform will experimentally be redirected to TaskScheduler.
832 virtual bool RedirectNonUINonIOBrowserThreadsToTaskScheduler(); 832 virtual bool RedirectNonUINonIOBrowserThreadsToTaskScheduler();
833 }; 833 };
834 834
835 } // namespace content 835 } // namespace content
836 836
837 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ 837 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_
OLDNEW
« no previous file with comments | « content/public/browser/browser_thread.h ('k') | content/public/browser/content_browser_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698