[content shell] hook up testRunner.dumpEditingCallbacks
[chromium-blink-merge.git] / content / common / request_extra_data.h
blobed8e7f51d2abf4603b6e884983dfce1bde0889b4
1 // Copyright (c) 2012 The Chromium Authors. 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.
5 #ifndef CONTENT_COMMON_REQUEST_EXTRA_DATA_H_
6 #define CONTENT_COMMON_REQUEST_EXTRA_DATA_H_
8 #include "base/compiler_specific.h"
9 #include "content/common/content_export.h"
10 #include "content/public/common/page_transition_types.h"
11 #include "webkit/glue/weburlrequest_extradata_impl.h"
13 namespace content {
15 // The RenderView stores an instance of this class in the "extra data" of each
16 // ResourceRequest (see RenderView::willSendRequest).
17 class CONTENT_EXPORT RequestExtraData
18 : NON_EXPORTED_BASE(public webkit_glue::WebURLRequestExtraDataImpl) {
19 public:
20 RequestExtraData(WebKit::WebReferrerPolicy referrer_policy,
21 const WebKit::WebString& custom_user_agent,
22 bool is_main_frame,
23 int64 frame_id,
24 bool parent_is_main_frame,
25 int64 parent_frame_id,
26 bool allow_download,
27 PageTransition transition_type,
28 int transferred_request_child_id,
29 int transferred_request_request_id);
30 virtual ~RequestExtraData();
32 bool is_main_frame() const { return is_main_frame_; }
33 int64 frame_id() const { return frame_id_; }
34 bool parent_is_main_frame() const { return parent_is_main_frame_; }
35 int64 parent_frame_id() const { return parent_frame_id_; }
36 bool allow_download() const { return allow_download_; }
37 PageTransition transition_type() const { return transition_type_; }
38 int transferred_request_child_id() const {
39 return transferred_request_child_id_;
41 int transferred_request_request_id() const {
42 return transferred_request_request_id_;
45 private:
46 bool is_main_frame_;
47 int64 frame_id_;
48 bool parent_is_main_frame_;
49 int64 parent_frame_id_;
50 bool allow_download_;
51 PageTransition transition_type_;
52 int transferred_request_child_id_;
53 int transferred_request_request_id_;
55 DISALLOW_COPY_AND_ASSIGN(RequestExtraData);
58 } // namespace content
60 #endif // CONTENT_COMMON_REQUEST_EXTRA_DATA_H_