summaryrefslogtreecommitdiffstats
path: root/chromium/content/renderer/pepper/url_request_info_util.h
blob: 22ab684bddf9b5c8a7b93bc0c93f8ee95601cd60 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CONTENT_RENDERER_PEPPER_URL_REQUEST_INFO_UTIL_H_
#define CONTENT_RENDERER_PEPPER_URL_REQUEST_INFO_UTIL_H_

#include "base/memory/ref_counted.h"
#include "content/common/content_export.h"
#include "ppapi/c/pp_instance.h"

namespace ppapi {
struct URLRequestInfoData;
}

namespace blink {
class WebLocalFrame;
class WebURLRequest;
}

namespace content {

// Creates the WebKit URL request from the current request info. Returns true
// on success, false if the request is invalid (in which case *dest may be
// partially initialized). Any upload files with only resource IDs (no file ref
// pointers) will be populated by this function on success.
CONTENT_EXPORT bool CreateWebURLRequest(PP_Instance instance,
                                        ppapi::URLRequestInfoData* data,
                                        blink::WebLocalFrame* frame,
                                        blink::WebURLRequest* dest);

// Returns true if universal access is required to use the given request.
CONTENT_EXPORT bool URLRequestRequiresUniversalAccess(
    const ppapi::URLRequestInfoData& data);

}  // namespace content

#endif  // CONTENT_RENDERER_PEPPER_URL_REQUEST_INFO_UTIL_H_