| OLD | NEW | 
|   1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |   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 |   2 // Use of this source code is governed by a BSD-style license that can be | 
|   3 // found in the LICENSE file. |   3 // found in the LICENSE file. | 
|   4  |   4  | 
|   5 #ifndef CONTENT_CHILD_REQUEST_EXTRA_DATA_H_ |   5 #ifndef CONTENT_CHILD_REQUEST_EXTRA_DATA_H_ | 
|   6 #define CONTENT_CHILD_REQUEST_EXTRA_DATA_H_ |   6 #define CONTENT_CHILD_REQUEST_EXTRA_DATA_H_ | 
|   7  |   7  | 
|   8 #include "base/compiler_specific.h" |   8 #include "base/compiler_specific.h" | 
|   9 #include "content/common/content_export.h" |   9 #include "content/common/content_export.h" | 
|  10 #include "content/public/common/page_transition_types.h" |  10 #include "content/public/common/page_transition_types.h" | 
|  11 #include "third_party/WebKit/public/web/WebPageVisibilityState.h" |  11 #include "third_party/WebKit/public/web/WebPageVisibilityState.h" | 
|  12 #include "webkit/child/weburlrequest_extradata_impl.h" |  12 #include "webkit/child/weburlrequest_extradata_impl.h" | 
|  13  |  13  | 
|  14 namespace content { |  14 namespace content { | 
|  15  |  15  | 
|  16 // The RenderView stores an instance of this class in the "extra data" of each |  16 // The RenderView stores an instance of this class in the "extra data" of each | 
|  17 // ResourceRequest (see RenderFrameImpl::willSendRequest). |  17 // ResourceRequest (see RenderFrameImpl::willSendRequest). | 
|  18 class CONTENT_EXPORT RequestExtraData |  18 class CONTENT_EXPORT RequestExtraData | 
|  19     : NON_EXPORTED_BASE(public webkit_glue::WebURLRequestExtraDataImpl) { |  19     : NON_EXPORTED_BASE(public webkit_glue::WebURLRequestExtraDataImpl) { | 
|  20  public: |  20  public: | 
|  21   RequestExtraData(blink::WebPageVisibilityState visibility_state, |  21   RequestExtraData(blink::WebPageVisibilityState visibility_state, | 
|  22                    const blink::WebString& custom_user_agent, |  22                    const blink::WebString& custom_user_agent, | 
|  23                    bool was_after_preconnect_request, |  23                    bool was_after_preconnect_request, | 
|  24                    int render_frame_id, |  24                    int render_frame_id, | 
|  25                    bool is_main_frame, |  25                    bool is_main_frame, | 
|  26                    int64 frame_id, |  | 
|  27                    const GURL& frame_origin, |  26                    const GURL& frame_origin, | 
|  28                    bool parent_is_main_frame, |  27                    bool parent_is_main_frame, | 
|  29                    int64 parent_frame_id, |  28                    int parent_render_frame_id, | 
|  30                    bool allow_download, |  29                    bool allow_download, | 
|  31                    PageTransition transition_type, |  30                    PageTransition transition_type, | 
|  32                    bool should_replace_current_entry, |  31                    bool should_replace_current_entry, | 
|  33                    int transferred_request_child_id, |  32                    int transferred_request_child_id, | 
|  34                    int transferred_request_request_id); |  33                    int transferred_request_request_id); | 
|  35   virtual ~RequestExtraData(); |  34   virtual ~RequestExtraData(); | 
|  36  |  35  | 
|  37   blink::WebPageVisibilityState visibility_state() const { |  36   blink::WebPageVisibilityState visibility_state() const { | 
|  38     return visibility_state_; |  37     return visibility_state_; | 
|  39   } |  38   } | 
|  40   int render_frame_id() const { return render_frame_id_; } |  39   int render_frame_id() const { return render_frame_id_; } | 
|  41   bool is_main_frame() const { return is_main_frame_; } |  40   bool is_main_frame() const { return is_main_frame_; } | 
|  42   int64 frame_id() const { return frame_id_; } |  | 
|  43   GURL frame_origin() const { return frame_origin_; } |  41   GURL frame_origin() const { return frame_origin_; } | 
|  44   bool parent_is_main_frame() const { return parent_is_main_frame_; } |  42   bool parent_is_main_frame() const { return parent_is_main_frame_; } | 
|  45   int64 parent_frame_id() const { return parent_frame_id_; } |  43   int parent_render_frame_id() const { return parent_render_frame_id_; } | 
|  46   bool allow_download() const { return allow_download_; } |  44   bool allow_download() const { return allow_download_; } | 
|  47   PageTransition transition_type() const { return transition_type_; } |  45   PageTransition transition_type() const { return transition_type_; } | 
|  48   bool should_replace_current_entry() const { |  46   bool should_replace_current_entry() const { | 
|  49     return should_replace_current_entry_; |  47     return should_replace_current_entry_; | 
|  50   } |  48   } | 
|  51   int transferred_request_child_id() const { |  49   int transferred_request_child_id() const { | 
|  52     return transferred_request_child_id_; |  50     return transferred_request_child_id_; | 
|  53   } |  51   } | 
|  54   int transferred_request_request_id() const { |  52   int transferred_request_request_id() const { | 
|  55     return transferred_request_request_id_; |  53     return transferred_request_request_id_; | 
|  56   } |  54   } | 
|  57  |  55  | 
|  58  private: |  56  private: | 
|  59   blink::WebPageVisibilityState visibility_state_; |  57   blink::WebPageVisibilityState visibility_state_; | 
|  60   int render_frame_id_; |  58   int render_frame_id_; | 
|  61   bool is_main_frame_; |  59   bool is_main_frame_; | 
|  62   int64 frame_id_; |  | 
|  63   GURL frame_origin_; |  60   GURL frame_origin_; | 
|  64   bool parent_is_main_frame_; |  61   bool parent_is_main_frame_; | 
|  65   int64 parent_frame_id_; |  62   int parent_render_frame_id_; | 
|  66   bool allow_download_; |  63   bool allow_download_; | 
|  67   PageTransition transition_type_; |  64   PageTransition transition_type_; | 
|  68   bool should_replace_current_entry_; |  65   bool should_replace_current_entry_; | 
|  69   int transferred_request_child_id_; |  66   int transferred_request_child_id_; | 
|  70   int transferred_request_request_id_; |  67   int transferred_request_request_id_; | 
|  71  |  68  | 
|  72   DISALLOW_COPY_AND_ASSIGN(RequestExtraData); |  69   DISALLOW_COPY_AND_ASSIGN(RequestExtraData); | 
|  73 }; |  70 }; | 
|  74  |  71  | 
|  75 }  // namespace content |  72 }  // namespace content | 
|  76  |  73  | 
|  77 #endif  // CONTENT_CHILD_REQUEST_EXTRA_DATA_H_ |  74 #endif  // CONTENT_CHILD_REQUEST_EXTRA_DATA_H_ | 
| OLD | NEW |