d57f1c63cb8a09aa09df50a2b433dfdab61ec377
[platform/framework/web/crosswalk.git] / src / xwalk / runtime / browser / runtime_resource_dispatcher_host_delegate.h
1 // Copyright (c) 2013 Intel Corporation. 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 XWALK_RUNTIME_BROWSER_RUNTIME_RESOURCE_DISPATCHER_HOST_DELEGATE_H_
6 #define XWALK_RUNTIME_BROWSER_RUNTIME_RESOURCE_DISPATCHER_HOST_DELEGATE_H_
7
8 #include "content/public/browser/resource_dispatcher_host_delegate.h"
9
10 namespace xwalk {
11
12 class RuntimeResourceDispatcherHostDelegate
13     : public content::ResourceDispatcherHostDelegate {
14  public:
15   RuntimeResourceDispatcherHostDelegate();
16   virtual ~RuntimeResourceDispatcherHostDelegate();
17
18   static void ResourceDispatcherHostCreated();
19   static scoped_ptr<RuntimeResourceDispatcherHostDelegate> Create();
20
21   void RequestBeginning(
22       net::URLRequest* request,
23       content::ResourceContext* resource_context,
24       content::AppCacheService* appcache_service,
25       content::ResourceType resource_type,
26       ScopedVector<content::ResourceThrottle>* throttles) override;
27   void DownloadStarting(
28       net::URLRequest* request,
29       content::ResourceContext* resource_context,
30       int child_id,
31       int route_id,
32       int request_id,
33       bool is_content_initiated,
34       bool must_download,
35       ScopedVector<content::ResourceThrottle>* throttles) override;
36   bool HandleExternalProtocol(
37       const GURL& url,
38       int child_id,
39       int route_id) override;
40
41  private:
42   DISALLOW_COPY_AND_ASSIGN(RuntimeResourceDispatcherHostDelegate);
43 };
44
45 }  // namespace xwalk
46
47 #endif  // XWALK_RUNTIME_BROWSER_RUNTIME_RESOURCE_DISPATCHER_HOST_DELEGATE_H_