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

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

Issue 2762553002: Add canUpdateLayout & canHandleGestureEvent to WebViewClient. (Closed)
Patch Set: Fix merge issues. Created 3 years, 8 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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 class TestWebViewClient : public WebViewClient { 164 class TestWebViewClient : public WebViewClient {
165 public: 165 public:
166 TestWebViewClient() 166 TestWebViewClient()
167 : m_testWebWidgetClient(this), m_animationScheduled(false) {} 167 : m_testWebWidgetClient(this), m_animationScheduled(false) {}
168 virtual ~TestWebViewClient() {} 168 virtual ~TestWebViewClient() {}
169 WebLayerTreeView* initializeLayerTreeView() override; 169 WebLayerTreeView* initializeLayerTreeView() override;
170 170
171 void scheduleAnimation() override { m_animationScheduled = true; } 171 void scheduleAnimation() override { m_animationScheduled = true; }
172 bool animationScheduled() { return m_animationScheduled; } 172 bool animationScheduled() { return m_animationScheduled; }
173 void clearAnimationScheduled() { m_animationScheduled = false; } 173 void clearAnimationScheduled() { m_animationScheduled = false; }
174 bool canHandleGestureEvent() override { return true; }
175 bool canUpdateLayout() override { return true; }
174 176
175 // TODO(lfg): This is a temporary method to retrieve the WebWidgetClient, 177 // TODO(lfg): This is a temporary method to retrieve the WebWidgetClient,
176 // while we refactor WebView to not inherit from Webwidget. 178 // while we refactor WebView to not inherit from Webwidget.
177 // Returns the WebWidgetClient. 179 // Returns the WebWidgetClient.
178 TestWebWidgetClient* widgetClient() { return &m_testWebWidgetClient; } 180 TestWebWidgetClient* widgetClient() { return &m_testWebWidgetClient; }
179 181
180 private: 182 private:
181 friend class TestWebViewWidgetClient; 183 friend class TestWebViewWidgetClient;
182 184
183 TestWebViewWidgetClient m_testWebWidgetClient; 185 TestWebViewWidgetClient m_testWebWidgetClient;
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 WebDOMMessageEvent) override {} 279 WebDOMMessageEvent) override {}
278 280
279 private: 281 private:
280 Persistent<WebRemoteFrameImpl> const m_frame; 282 Persistent<WebRemoteFrameImpl> const m_frame;
281 }; 283 };
282 284
283 } // namespace FrameTestHelpers 285 } // namespace FrameTestHelpers
284 } // namespace blink 286 } // namespace blink
285 287
286 #endif // FrameTestHelpers_h 288 #endif // FrameTestHelpers_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebViewImpl.cpp ('k') | third_party/WebKit/public/web/WebViewClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698