[Android] Implement 3-way sensor fallback for Device Orientation.
[chromium-blink-merge.git] / content / public / test / frame_load_waiter.h
blobd3f8ac8b33886d4e62d2b8c94e426748a50c82e7
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CONTENT_PUBLIC_TEST_FRAME_LOAD_WAITER_H_
6 #define CONTENT_PUBLIC_TEST_FRAME_LOAD_WAITER_H_
8 #include "base/macros.h"
9 #include "base/run_loop.h"
10 #include "content/public/renderer/render_frame_observer.h"
12 namespace content {
14 // Helper class to spin the run loop when waiting for a frame load to complete.
15 // Blink uses a threaded HTML parser, so it's no longer sufficient to just spin
16 // the run loop once to process all pending messages.
17 class FrameLoadWaiter : public RenderFrameObserver {
18 public:
19 explicit FrameLoadWaiter(RenderFrame* frame);
20 void Wait();
22 private:
23 void DidFinishLoad() override;
25 base::RunLoop run_loop_;
27 DISALLOW_COPY_AND_ASSIGN(FrameLoadWaiter);
30 } // namespace content
32 #endif // CONTENT_PUBLIC_TEST_FRAME_LOAD_WAITER_H_