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