Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / content / shell / browser / shell_resource_dispatcher_host_delegate.h
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_SHELL_BROWSER_SHELL_RESOURCE_DISPATCHER_HOST_DELEGATE_H_
6 #define CONTENT_SHELL_BROWSER_SHELL_RESOURCE_DISPATCHER_HOST_DELEGATE_H_
7
8 #include "base/callback.h"
9 #include "base/compiler_specific.h"
10 #include "content/public/browser/resource_dispatcher_host_delegate.h"
11
12 namespace content {
13
14 class ShellResourceDispatcherHostDelegate
15     : public ResourceDispatcherHostDelegate {
16  public:
17   ShellResourceDispatcherHostDelegate();
18   ~ShellResourceDispatcherHostDelegate() override;
19
20   // ResourceDispatcherHostDelegate implementation.
21   ResourceDispatcherHostLoginDelegate* CreateLoginDelegate(
22       net::AuthChallengeInfo* auth_info,
23       net::URLRequest* request) override;
24
25   // Used for content_browsertests.
26   void set_login_request_callback(
27       base::Callback<void()> login_request_callback) {
28     login_request_callback_ = login_request_callback;
29   }
30
31  private:
32   base::Callback<void()> login_request_callback_;
33
34   DISALLOW_COPY_AND_ASSIGN(ShellResourceDispatcherHostDelegate);
35 };
36
37 }  // namespace content
38
39 #endif  // CONTENT_SHELL_BROWSER_SHELL_RESOURCE_DISPATCHER_HOST_DELEGATE_H_