forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
scoped_clipboard_history_pause_impl.h
33 lines (26 loc) · 1.15 KB
/
scoped_clipboard_history_pause_impl.h
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
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef ASH_CLIPBOARD_SCOPED_CLIPBOARD_HISTORY_PAUSE_IMPL_H_
#define ASH_CLIPBOARD_SCOPED_CLIPBOARD_HISTORY_PAUSE_IMPL_H_
#include "ash/ash_export.h"
#include "ash/public/cpp/scoped_clipboard_history_pause.h"
#include "base/memory/weak_ptr.h"
namespace ash {
class ClipboardHistory;
// Prevents clipboard history from being recorded within its lifetime. If
// anything is copied within its lifetime, history will not be recorded.
class ASH_EXPORT ScopedClipboardHistoryPauseImpl
: public ScopedClipboardHistoryPause {
public:
explicit ScopedClipboardHistoryPauseImpl(ClipboardHistory* clipboard_history);
ScopedClipboardHistoryPauseImpl(const ScopedClipboardHistoryPauseImpl&) =
delete;
ScopedClipboardHistoryPauseImpl& operator=(
const ScopedClipboardHistoryPauseImpl&) = delete;
~ScopedClipboardHistoryPauseImpl() override;
private:
base::WeakPtr<ClipboardHistory> const clipboard_history_;
};
} // namespace ash
#endif // ASH_CLIPBOARD_SCOPED_CLIPBOARD_HISTORY_PAUSE_IMPL_H_