OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2003, 2006 Apple Computer, Inc. All rights reserved. | 2 * Copyright (C) 2003, 2006 Apple Computer, Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 15 matching lines...) Expand all Loading... |
26 #ifndef FrameLoadRequest_h | 26 #ifndef FrameLoadRequest_h |
27 #define FrameLoadRequest_h | 27 #define FrameLoadRequest_h |
28 | 28 |
29 #include "ResourceRequest.h" | 29 #include "ResourceRequest.h" |
30 | 30 |
31 namespace WebCore { | 31 namespace WebCore { |
32 | 32 |
33 struct FrameLoadRequest { | 33 struct FrameLoadRequest { |
34 public: | 34 public: |
35 FrameLoadRequest() | 35 FrameLoadRequest() |
| 36 : m_fromUserGestureSet(false) |
| 37 , m_fromUserGesture(false) |
36 { | 38 { |
37 } | 39 } |
38 | 40 |
39 FrameLoadRequest(const ResourceRequest& resourceRequest) | 41 FrameLoadRequest(const ResourceRequest& resourceRequest) |
40 : m_resourceRequest(resourceRequest) | 42 : m_resourceRequest(resourceRequest) |
| 43 , m_fromUserGestureSet(false) |
| 44 , m_fromUserGesture(false) |
41 { | 45 { |
42 } | 46 } |
43 | 47 |
44 FrameLoadRequest(const ResourceRequest& resourceRequest, const String& f
rameName) | 48 FrameLoadRequest(const ResourceRequest& resourceRequest, const String& f
rameName) |
45 : m_resourceRequest(resourceRequest) | 49 : m_resourceRequest(resourceRequest) |
46 , m_frameName(frameName) | 50 , m_frameName(frameName) |
| 51 , m_fromUserGestureSet(false) |
| 52 , m_fromUserGesture(false) |
47 { | 53 { |
48 } | 54 } |
49 | 55 |
50 bool isEmpty() const { return m_resourceRequest.isEmpty(); } | 56 bool isEmpty() const { return m_resourceRequest.isEmpty(); } |
51 | 57 |
52 ResourceRequest& resourceRequest() { return m_resourceRequest; } | 58 ResourceRequest& resourceRequest() { return m_resourceRequest; } |
53 const ResourceRequest& resourceRequest() const { return m_resourceReques
t; } | 59 const ResourceRequest& resourceRequest() const { return m_resourceReques
t; } |
54 | 60 |
55 const String& frameName() const { return m_frameName; } | 61 const String& frameName() const { return m_frameName; } |
56 void setFrameName(const String& frameName) { m_frameName = frameName; } | 62 void setFrameName(const String& frameName) { m_frameName = frameName; } |
| 63 bool isFromUserGestureSet() const { return m_fromUserGestureSet; } |
| 64 bool isFromUserGesture() const { ASSERT(m_fromUserGestureSet); return m_
fromUserGesture; } |
| 65 void setIsFromUserGesture(bool b) { m_fromUserGestureSet = true; m_fromU
serGesture = b; } |
57 | 66 |
58 private: | 67 private: |
59 ResourceRequest m_resourceRequest; | 68 ResourceRequest m_resourceRequest; |
60 String m_frameName; | 69 String m_frameName; |
| 70 bool m_fromUserGestureSet; |
| 71 bool m_fromUserGesture; |
61 }; | 72 }; |
62 | 73 |
63 } | 74 } |
64 | 75 |
65 #endif // FrameLoadRequest_h | 76 #endif // FrameLoadRequest_h |
66 | 77 |
OLD | NEW |