1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
   17
   18
   19
   20
   21
   22
   23
   24
   25
   26
   27
   28
   29
   30
   31
   32
   33
   34
   35
   36

ash / glanceables / common / test / glanceables_test_new_window_delegate.h [blame]

// Copyright 2023 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef ASH_GLANCEABLES_COMMON_TEST_GLANCEABLES_TEST_NEW_WINDOW_DELEGATE_H_
#define ASH_GLANCEABLES_COMMON_TEST_GLANCEABLES_TEST_NEW_WINDOW_DELEGATE_H_

#include <memory>

#include "ash/ash_export.h"

class GURL;

namespace ash {

class GlanceablesTestNewWindowDelegateImpl;

// Convenient tests helper to check the last opened URL via `NewWindowDelegate`.
class ASH_EXPORT GlanceablesTestNewWindowDelegate {
 public:
  GlanceablesTestNewWindowDelegate();
  GlanceablesTestNewWindowDelegate(const GlanceablesTestNewWindowDelegate&) =
      delete;
  GlanceablesTestNewWindowDelegate& operator=(
      const GlanceablesTestNewWindowDelegate&) = delete;
  ~GlanceablesTestNewWindowDelegate();

  GURL GetLastOpenedUrl() const;

 private:
  std::unique_ptr<GlanceablesTestNewWindowDelegateImpl> new_window_delegate_;
};

}  // namespace ash

#endif  // ASH_GLANCEABLES_COMMON_TEST_GLANCEABLES_TEST_NEW_WINDOW_DELEGATE_H_