Commit d38665c9 authored by Tao Bai's avatar Tao Bai Committed by Commit Bot

Remove copy constructor of AwContentsLifecycleNotifier::AwContentsData

Bug: 1042048
Change-Id: I73ce0bbbc10eb54a9e602ff638e1c3ec49421715
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2033844
Commit-Queue: Tao Bai <michaelbai@chromium.org>
Reviewed-by: default avatarBo <boliu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#737940}
parent 66224ac5
......@@ -31,6 +31,13 @@ AwContentsLifecycleNotifier::AwContentsState CalcuateState(
} // namespace
AwContentsLifecycleNotifier::AwContentsData::AwContentsData() = default;
AwContentsLifecycleNotifier::AwContentsData::AwContentsData(
AwContentsData&& data) = default;
AwContentsLifecycleNotifier::AwContentsData::~AwContentsData() = default;
// static
AwContentsLifecycleNotifier& AwContentsLifecycleNotifier::GetInstance() {
static base::NoDestructor<AwContentsLifecycleNotifier> instance;
......@@ -45,8 +52,7 @@ void AwContentsLifecycleNotifier::OnWebViewCreated(
bool first_created = !HasAwContentsInstance();
DCHECK(aw_contents_id_to_data_.find(id) == aw_contents_id_to_data_.end());
aw_contents_id_to_data_.insert(
std::make_pair(id, AwContentsLifecycleNotifier::AwContentsData()));
aw_contents_id_to_data_.emplace(id, AwContentsData());
state_count_[ToIndex(AwContentsState::kDetached)]++;
UpdateAppState();
......
......@@ -46,9 +46,16 @@ class AwContentsLifecycleNotifier {
private:
struct AwContentsData {
AwContentsData();
AwContentsData(AwContentsData&& data);
~AwContentsData();
bool attached_to_window = false;
bool window_visible = false;
AwContentsState aw_content_state = AwContentsState::kDetached;
private:
DISALLOW_COPY(AwContentsData);
};
friend base::NoDestructor<AwContentsLifecycleNotifier>;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment