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

Side by Side Diff: content/public/test/render_view_test.h

Issue 2118903002: scheduler: Move the Blink scheduler into Blink (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 4 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
« no previous file with comments | « content/public/common/content_switches.cc ('k') | content/public/test/render_view_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_PUBLIC_TEST_RENDER_VIEW_TEST_H_ 5 #ifndef CONTENT_PUBLIC_TEST_RENDER_VIEW_TEST_H_
6 #define CONTENT_PUBLIC_TEST_RENDER_VIEW_TEST_H_ 6 #define CONTENT_PUBLIC_TEST_RENDER_VIEW_TEST_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
11 #include <string> 11 #include <string>
12 12
13 #include "base/command_line.h" 13 #include "base/command_line.h"
14 #include "base/message_loop/message_loop.h" 14 #include "base/message_loop/message_loop.h"
15 #include "base/strings/string16.h" 15 #include "base/strings/string16.h"
16 #include "base/test/test_io_thread.h" 16 #include "base/test/test_io_thread.h"
17 #include "build/build_config.h" 17 #include "build/build_config.h"
18 #include "content/public/browser/native_web_keyboard_event.h" 18 #include "content/public/browser/native_web_keyboard_event.h"
19 #include "content/public/common/main_function_params.h" 19 #include "content/public/common/main_function_params.h"
20 #include "content/public/common/page_state.h" 20 #include "content/public/common/page_state.h"
21 #include "content/public/test/mock_render_thread.h" 21 #include "content/public/test/mock_render_thread.h"
22 #include "mojo/edk/test/scoped_ipc_support.h" 22 #include "mojo/edk/test/scoped_ipc_support.h"
23 #include "testing/gtest/include/gtest/gtest.h" 23 #include "testing/gtest/include/gtest/gtest.h"
24 #include "third_party/WebKit/public/platform/Platform.h" 24 #include "third_party/WebKit/public/platform/Platform.h"
25 #include "third_party/WebKit/public/web/WebFrame.h" 25 #include "third_party/WebKit/public/web/WebFrame.h"
26 #include "third_party/WebKit/public/web/WebLeakDetector.h" 26 #include "third_party/WebKit/public/web/WebLeakDetector.h"
27 27
28 namespace blink { 28 namespace blink {
29 namespace scheduler {
30 class RendererScheduler;
31 }
29 class WebInputElement; 32 class WebInputElement;
30 class WebWidget; 33 class WebWidget;
31 } 34 }
32 35
33 namespace gfx { 36 namespace gfx {
34 class Rect; 37 class Rect;
35 } 38 }
36 39
37 namespace scheduler {
38 class RendererScheduler;
39 }
40
41 namespace content { 40 namespace content {
42 class ContentBrowserClient; 41 class ContentBrowserClient;
43 class ContentClient; 42 class ContentClient;
44 class ContentRendererClient; 43 class ContentRendererClient;
45 class FakeCompositorDependencies; 44 class FakeCompositorDependencies;
46 class MockRenderProcess; 45 class MockRenderProcess;
47 class PageState; 46 class PageState;
48 class RendererMainPlatformDelegate; 47 class RendererMainPlatformDelegate;
49 class RendererBlinkPlatformImplTestOverrideImpl; 48 class RendererBlinkPlatformImplTestOverrideImpl;
50 class RenderView; 49 class RenderView;
51 struct ResizeParams; 50 struct ResizeParams;
52 51
53 class RenderViewTest : public testing::Test, blink::WebLeakDetectorClient { 52 class RenderViewTest : public testing::Test, blink::WebLeakDetectorClient {
54 public: 53 public:
55 // A special BlinkPlatformImpl class with overrides that are useful for 54 // A special BlinkPlatformImpl class with overrides that are useful for
56 // RenderViewTest. 55 // RenderViewTest.
57 class RendererBlinkPlatformImplTestOverride { 56 class RendererBlinkPlatformImplTestOverride {
58 public: 57 public:
59 RendererBlinkPlatformImplTestOverride(); 58 RendererBlinkPlatformImplTestOverride();
60 ~RendererBlinkPlatformImplTestOverride(); 59 ~RendererBlinkPlatformImplTestOverride();
61 blink::Platform* Get() const; 60 blink::Platform* Get() const;
62 void Shutdown(); 61 void Shutdown();
63 62
64 private: 63 private:
65 std::unique_ptr<scheduler::RendererScheduler> renderer_scheduler_; 64 std::unique_ptr<blink::scheduler::RendererScheduler> renderer_scheduler_;
66 std::unique_ptr<RendererBlinkPlatformImplTestOverrideImpl> 65 std::unique_ptr<RendererBlinkPlatformImplTestOverrideImpl>
67 blink_platform_impl_; 66 blink_platform_impl_;
68 }; 67 };
69 68
70 RenderViewTest(); 69 RenderViewTest();
71 ~RenderViewTest() override; 70 ~RenderViewTest() override;
72 71
73 protected: 72 protected:
74 // Spins the message loop to process all messages that are currently pending. 73 // Spins the message loop to process all messages that are currently pending.
75 void ProcessPendingMessages(); 74 void ProcessPendingMessages();
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 std::unique_ptr<base::mac::ScopedNSAutoreleasePool> autorelease_pool_; 212 std::unique_ptr<base::mac::ScopedNSAutoreleasePool> autorelease_pool_;
214 #endif 213 #endif
215 214
216 private: 215 private:
217 void GoToOffset(int offset, const GURL& url, const PageState& state); 216 void GoToOffset(int offset, const GURL& url, const PageState& state);
218 }; 217 };
219 218
220 } // namespace content 219 } // namespace content
221 220
222 #endif // CONTENT_PUBLIC_TEST_RENDER_VIEW_TEST_H_ 221 #endif // CONTENT_PUBLIC_TEST_RENDER_VIEW_TEST_H_
OLDNEW
« no previous file with comments | « content/public/common/content_switches.cc ('k') | content/public/test/render_view_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698