1 // Copyright 2015 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 COMPONENTS_OPEN_FROM_CLIPBOARD_FAKE_CLIPBOARD_RECENT_CONTENT_H_
6 #define COMPONENTS_OPEN_FROM_CLIPBOARD_FAKE_CLIPBOARD_RECENT_CONTENT_H_
8 #include "base/macros.h"
9 #include "base/time/time.h"
10 #include "components/open_from_clipboard/clipboard_recent_content.h"
13 // FakeClipboardRecentContent implements ClipboardRecentContent interface by
14 // returning configurable values for use by tests.
15 class FakeClipboardRecentContent
: public ClipboardRecentContent
{
17 FakeClipboardRecentContent();
18 ~FakeClipboardRecentContent() override
;
20 // ClipboardRecentContent implementation.
21 bool GetRecentURLFromClipboard(GURL
* url
) const override
;
22 base::TimeDelta
GetClipboardContentAge() const override
;
23 void SuppressClipboardContent() override
;
24 void RecentURLDisplayed() override
;
26 // Sets the URL and clipboard content age.
27 void SetClipboardContent(const GURL
& url
, base::TimeDelta content_age
);
30 GURL clipboard_content_
;
31 base::TimeDelta content_age_
;
32 bool suppress_content_
;
34 DISALLOW_COPY_AND_ASSIGN(FakeClipboardRecentContent
);
37 #endif // COMPONENTS_OPEN_FROM_CLIPBOARD_FAKE_CLIPBOARD_RECENT_CONTENT_H_