- add sources.
[platform/framework/web/crosswalk.git] / src / content / public / child / resource_dispatcher_delegate.h
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.\r
2 // Use of this source code is governed by a BSD-style license that can be\r
3 // found in the LICENSE file.\r
4 \r
5 #ifndef CONTENT_PUBLIC_CHILD_RESOURCE_DISPATCHER_DELEGATE_H_\r
6 #define CONTENT_PUBLIC_CHILD_RESOURCE_DISPATCHER_DELEGATE_H_\r
7 \r
8 #include "content/common/content_export.h"\r
9 #include "webkit/child/resource_loader_bridge.h"\r
10 \r
11 namespace content {\r
12 \r
13 // Interface that allows observing request events and optionally replacing the\r
14 // peer.\r
15 class CONTENT_EXPORT ResourceDispatcherDelegate {\r
16  public:\r
17   virtual ~ResourceDispatcherDelegate() {}\r
18 \r
19   virtual webkit_glue::ResourceLoaderBridge::Peer* OnRequestComplete(\r
20       webkit_glue::ResourceLoaderBridge::Peer* current_peer,\r
21       ResourceType::Type resource_type,\r
22       int error_code) = 0;\r
23 \r
24   virtual webkit_glue::ResourceLoaderBridge::Peer* OnReceivedResponse(\r
25       webkit_glue::ResourceLoaderBridge::Peer* current_peer,\r
26       const std::string& mime_type,\r
27       const GURL& url) = 0;\r
28 };\r
29 \r
30 }  // namespace content\r
31 \r
32 #endif  // CONTENT_PUBLIC_CHILD_RESOURCE_DISPATCHER_DELEGATE_H_\r