Update CrOS OOBE throbber to MD throbber; delete old asset
[chromium-blink-merge.git] / chrome / test / remoting / page_load_notification_observer.h
blob391dd860272c9cf811fedf29feedf6025f0aa670
1 // Copyright 2013 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 CHROME_TEST_REMOTING_PAGE_LOAD_NOTIFICATION_OBSERVER_H_
6 #define CHROME_TEST_REMOTING_PAGE_LOAD_NOTIFICATION_OBSERVER_H_
8 #include "content/public/test/test_utils.h"
9 #include "url/gurl.h"
11 namespace remoting {
13 // A PageLoadNotificationObserver allows code to wait until a give URL is loaded
14 // in any tab in any browser window, i.e. NotificationService::AllSources().
15 // This simple pattern is not easy to implement using
16 // WindowedNotificationObserver because we need to bind the observer object
17 // in the callback but we also need to provide the callback when constructing
18 // the observer object.
19 class PageLoadNotificationObserver
20 : public content::WindowedNotificationObserver {
21 public:
22 explicit PageLoadNotificationObserver(const GURL& target);
24 ~PageLoadNotificationObserver() override;
26 void set_ignore_url_parameters(bool ignore_url_parameters) {
27 ignore_url_parameters_ = ignore_url_parameters;
30 private:
31 bool IsTargetLoaded();
33 GURL target_;
34 bool ignore_url_parameters_;
36 DISALLOW_COPY_AND_ASSIGN(PageLoadNotificationObserver);
39 } // namespace remoting
41 #endif // CHROME_TEST_REMOTING_PAGE_LOAD_NOTIFICATION_OBSERVER_H_