Switch to new internal chromium branch dev/m38_2114 .
[platform/framework/web/chromium-efl.git] / tizen_src / impl / browser / resource_dispatcher_host_delegate_efl.h
1 #ifndef RESOURCE_DISPATCHER_HOST_DELEGATE_EFL_H
2 #define RESOURCE_DISPATCHER_HOST_DELEGATE_EFL_H
3
4 #include "base/compiler_specific.h"
5 #include "content/public/browser/resource_dispatcher_host_delegate.h"
6
7 namespace net {
8 class AuthChallengeInfo;
9 class URLRequest;
10 }
11
12 namespace content {
13
14 class ResourceDispatcherHostLoginDelegate;
15
16 class ResourceDispatcherHostDelegateEfl
17     : public ResourceDispatcherHostDelegate {
18  public:
19   ResourceDispatcherHostDelegateEfl()
20   {
21   }
22
23   // Called after ShouldBeginRequest to allow the embedder to add resource
24   // throttles.
25   virtual void RequestBeginning(net::URLRequest* request,
26       ResourceContext* resource_context,
27       AppCacheService* appcache_service,
28       ResourceType resource_type,
29       int child_id, int route_id,
30       ScopedVector<ResourceThrottle>* throttles) OVERRIDE;
31
32   // Create login delegate.
33   virtual ResourceDispatcherHostLoginDelegate* CreateLoginDelegate(
34       net::AuthChallengeInfo* auth_info, net::URLRequest* request) OVERRIDE;
35
36   // Called to trigger download.
37   virtual void DownloadStarting(
38       net::URLRequest* request,
39       content::ResourceContext* resource_context,
40       int child_id,
41       int route_id,
42       int request_id,
43       bool is_content_initiated,
44       bool must_download,
45       ScopedVector<content::ResourceThrottle>* throttles) OVERRIDE;
46
47 #if !defined(EWK_BRINGUP)
48   // Return true if it should override mime type, otherwise, return false.
49   virtual bool ShouldOverrideMimeType(
50       const GURL& url, std::string& mime_type) OVERRIDE;
51 #endif
52
53  private:
54   void TriggerNewDownloadStartCallback(
55       net::URLRequest* request,
56       const std::string& user_agent,
57       const std::string& content_disposition,
58       const std::string& mime_type,
59       int64 content_length);
60 };
61
62 } // namespace net
63
64 #endif // RESOURCE_DISPATCHER_HOST_DELEGATE_EFL_H