OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google 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 are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 private: | 91 private: |
92 WebViewImpl* m_webView; | 92 WebViewImpl* m_webView; |
93 }; | 93 }; |
94 | 94 |
95 // Minimal implementation of WebFrameClient needed for unit tests that load fram
es. Tests that load | 95 // Minimal implementation of WebFrameClient needed for unit tests that load fram
es. Tests that load |
96 // frames and need further specialization of WebFrameClient behavior should subc
lass this. | 96 // frames and need further specialization of WebFrameClient behavior should subc
lass this. |
97 class TestWebFrameClient : public WebFrameClient { | 97 class TestWebFrameClient : public WebFrameClient { |
98 public: | 98 public: |
99 TestWebFrameClient(); | 99 TestWebFrameClient(); |
100 | 100 |
101 virtual WebFrame* createChildFrame(WebLocalFrame* parent, const WebString& f
rameName) OVERRIDE; | 101 virtual WebFrame* createChildFrame(WebLocalFrame* parent, const WebString& f
rameName) override; |
102 virtual void frameDetached(WebFrame*) OVERRIDE; | 102 virtual void frameDetached(WebFrame*) override; |
103 virtual void didStartLoading(bool) OVERRIDE; | 103 virtual void didStartLoading(bool) override; |
104 virtual void didStopLoading() OVERRIDE; | 104 virtual void didStopLoading() override; |
105 | 105 |
106 bool isLoading() { return m_loadsInProgress > 0; } | 106 bool isLoading() { return m_loadsInProgress > 0; } |
107 | 107 |
108 private: | 108 private: |
109 int m_loadsInProgress; | 109 int m_loadsInProgress; |
110 }; | 110 }; |
111 | 111 |
112 // Minimal implementation of WebRemoteFrameClient needed for unit tests that loa
d remote frames. Tests that load | 112 // Minimal implementation of WebRemoteFrameClient needed for unit tests that loa
d remote frames. Tests that load |
113 // frames and need further specialization of WebFrameClient behavior should subc
lass this. | 113 // frames and need further specialization of WebFrameClient behavior should subc
lass this. |
114 class TestWebRemoteFrameClient : public WebRemoteFrameClient { | 114 class TestWebRemoteFrameClient : public WebRemoteFrameClient { |
115 public: | 115 public: |
116 // Notifies the embedder that a postMessage was issued to a remote frame. | 116 // Notifies the embedder that a postMessage was issued to a remote frame. |
117 virtual void postMessageEvent( | 117 virtual void postMessageEvent( |
118 WebLocalFrame* sourceFrame, | 118 WebLocalFrame* sourceFrame, |
119 WebRemoteFrame* targetFrame, | 119 WebRemoteFrame* targetFrame, |
120 WebSecurityOrigin targetOrigin, | 120 WebSecurityOrigin targetOrigin, |
121 WebDOMMessageEvent) { } | 121 WebDOMMessageEvent) { } |
122 }; | 122 }; |
123 | 123 |
124 class TestWebViewClient : public WebViewClient { | 124 class TestWebViewClient : public WebViewClient { |
125 public: | 125 public: |
126 virtual ~TestWebViewClient() { } | 126 virtual ~TestWebViewClient() { } |
127 virtual void initializeLayerTreeView() OVERRIDE; | 127 virtual void initializeLayerTreeView() override; |
128 virtual WebLayerTreeView* layerTreeView() OVERRIDE { return m_layerTreeView.
get(); } | 128 virtual WebLayerTreeView* layerTreeView() override { return m_layerTreeView.
get(); } |
129 | 129 |
130 private: | 130 private: |
131 OwnPtr<WebLayerTreeView> m_layerTreeView; | 131 OwnPtr<WebLayerTreeView> m_layerTreeView; |
132 }; | 132 }; |
133 | 133 |
134 } // namespace FrameTestHelpers | 134 } // namespace FrameTestHelpers |
135 } // namespace blink | 135 } // namespace blink |
136 | 136 |
137 #endif // FrameTestHelpers_h | 137 #endif // FrameTestHelpers_h |
OLD | NEW |