Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(467)

Side by Side Diff: third_party/WebKit/Source/web/tests/FrameTestHelpers.h

Issue 1414663011: Notifying the Out of Process Renderer about Visibility Change of a Remote Frame (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased & Added Blink Unit Tests Created 4 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 156
157 WebRemoteFrameImpl* frame() const { return m_frame; } 157 WebRemoteFrameImpl* frame() const { return m_frame; }
158 158
159 // WebRemoteFrameClient overrides: 159 // WebRemoteFrameClient overrides:
160 void frameDetached(DetachType) override; 160 void frameDetached(DetachType) override;
161 void postMessageEvent( 161 void postMessageEvent(
162 WebLocalFrame* sourceFrame, 162 WebLocalFrame* sourceFrame,
163 WebRemoteFrame* targetFrame, 163 WebRemoteFrame* targetFrame,
164 WebSecurityOrigin targetOrigin, 164 WebSecurityOrigin targetOrigin,
165 WebDOMMessageEvent) override { } 165 WebDOMMessageEvent) override { }
166 void visibilityChanged(bool visible) override { m_visible = visible; }
dcheng 2016/01/06 18:43:58 Move these to a subclass of TestWebRemoteFrameClie
EhsanK 2016/01/08 22:05:37 Done.
167
168 bool isVisible() { return m_visible; }
dcheng 2016/01/06 18:43:58 Nit: const
EhsanK 2016/01/08 22:05:37 Done.
166 169
167 private: 170 private:
168 RawPtrWillBePersistent<WebRemoteFrameImpl> const m_frame; 171 RawPtrWillBePersistent<WebRemoteFrameImpl> const m_frame;
172 bool m_visible;
169 }; 173 };
170 174
171 class TestWebViewClient : public WebViewClient { 175 class TestWebViewClient : public WebViewClient {
172 public: 176 public:
173 virtual ~TestWebViewClient() { } 177 virtual ~TestWebViewClient() { }
174 void initializeLayerTreeView() override; 178 void initializeLayerTreeView() override;
175 WebLayerTreeView* layerTreeView() override { return m_layerTreeView.get(); } 179 WebLayerTreeView* layerTreeView() override { return m_layerTreeView.get(); }
176 180
177 private: 181 private:
178 OwnPtr<WebLayerTreeView> m_layerTreeView; 182 OwnPtr<WebLayerTreeView> m_layerTreeView;
179 }; 183 };
180 184
181 } // namespace FrameTestHelpers 185 } // namespace FrameTestHelpers
182 } // namespace blink 186 } // namespace blink
183 187
184 #endif // FrameTestHelpers_h 188 #endif // FrameTestHelpers_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698