Roll src/third_party/WebKit 605a979:06cb9e9 (svn 202556:202558)
[chromium-blink-merge.git] / components / open_from_clipboard / fake_clipboard_recent_content.h
blobf628a89297008b6e2f84e83555e3e0fa33ab39b0
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"
11 #include "url/gurl.h"
13 // FakeClipboardRecentContent implements ClipboardRecentContent interface by
14 // returning configurable values for use by tests.
15 class FakeClipboardRecentContent : public ClipboardRecentContent {
16 public:
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);
29 private:
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_