Upstream version 10.39.225.0
[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
20   virtual void RequestBeginning(
21       net::URLRequest* request,
22       content::ResourceContext* resource_context,
23       content::AppCacheService* appcache_service,
24       content::ResourceType resource_type,
25       ScopedVector<content::ResourceThrottle>* throttles) OVERRIDE;
26   virtual void DownloadStarting(
27       net::URLRequest* request,
28       content::ResourceContext* resource_context,
29       int child_id,
30       int route_id,
31       int request_id,
32       bool is_content_initiated,
33       bool must_download,
34       ScopedVector<content::ResourceThrottle>* throttles) OVERRIDE;
35   virtual bool HandleExternalProtocol(
36       const GURL& url,
37       int child_id,
38       int route_id) OVERRIDE;
39
40  private:
41   DISALLOW_COPY_AND_ASSIGN(RuntimeResourceDispatcherHostDelegate);
42 };
43
44 }  // namespace xwalk
45
46 #endif  // XWALK_RUNTIME_BROWSER_RUNTIME_RESOURCE_DISPATCHER_HOST_DELEGATE_H_