Remove DISALLOW_* macros from ash/
This inlines all remaining DISALLOW_* macros in ash/. This is done
manually (vim regex + manually finding insertion position).
IWYU cleanup is left as a separate pass that is easier when these macros
go away.
Bug: 1010217
Change-Id: If5a71f565daa8ad7cc84f1a8acf2be8c9aa18d4c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3176289
Auto-Submit: Peter Boström <pbos@chromium.org>
Commit-Queue: Peter Boström <pbos@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Owners-Override: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/main@{#924608}
diff --git a/ash/accelerators/accelerator_controller_unittest.cc b/ash/accelerators/accelerator_controller_unittest.cc
index c6cd647..709a79f 100644
--- a/ash/accelerators/accelerator_controller_unittest.cc
+++ b/ash/accelerators/accelerator_controller_unittest.cc
@@ -2627,6 +2627,9 @@
public:
FakeMagnificationManager() = default;
+ FakeMagnificationManager(const FakeMagnificationManager&) = delete;
+ FakeMagnificationManager& operator=(const FakeMagnificationManager&) = delete;
+
void SetPrefs(PrefService* prefs) {
pref_change_registrar_ = std::make_unique<PrefChangeRegistrar>();
pref_change_registrar_->Init(prefs);
@@ -2645,8 +2648,6 @@
private:
std::unique_ptr<PrefChangeRegistrar> pref_change_registrar_;
PrefService* prefs_;
-
- DISALLOW_COPY_AND_ASSIGN(FakeMagnificationManager);
};
TEST_F(MagnifiersAcceleratorsTester, TestToggleFullscreenMagnifier) {
diff --git a/ash/accelerators/accelerator_unittest.cc b/ash/accelerators/accelerator_unittest.cc
index 8aa5db3e..7fced5b2 100644
--- a/ash/accelerators/accelerator_unittest.cc
+++ b/ash/accelerators/accelerator_unittest.cc
@@ -63,6 +63,9 @@
public:
AcceleratorTest() : is_in_overview_mode_(false) {}
+ AcceleratorTest(const AcceleratorTest&) = delete;
+ AcceleratorTest& operator=(const AcceleratorTest&) = delete;
+
void SetUp() override {
ui_controls::InstallUIControlsAura(test::CreateAshUIControls());
@@ -98,9 +101,6 @@
protected:
bool is_in_overview_mode_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(AcceleratorTest);
};
////////////////////////////////////////////////////////////////////////////////
diff --git a/ash/accelerators/exit_warning_handler.cc b/ash/accelerators/exit_warning_handler.cc
index f00918d..913936b 100644
--- a/ash/accelerators/exit_warning_handler.cc
+++ b/ash/accelerators/exit_warning_handler.cc
@@ -65,6 +65,10 @@
SetLayoutManager(std::make_unique<views::FillLayout>());
}
+ ExitWarningWidgetDelegateView(const ExitWarningWidgetDelegateView&) = delete;
+ ExitWarningWidgetDelegateView& operator=(
+ const ExitWarningWidgetDelegateView&) = delete;
+
void OnPaint(gfx::Canvas* canvas) override {
cc::PaintFlags flags;
flags.setStyle(cc::PaintFlags::kFill_Style);
@@ -82,8 +86,6 @@
std::u16string text_;
std::u16string accessible_name_;
int text_width_;
-
- DISALLOW_COPY_AND_ASSIGN(ExitWarningWidgetDelegateView);
};
} // namespace
diff --git a/ash/accessibility/accessibility_controller_impl.h b/ash/accessibility/accessibility_controller_impl.h
index 193d836..6a6535b 100644
--- a/ash/accessibility/accessibility_controller_impl.h
+++ b/ash/accessibility/accessibility_controller_impl.h
@@ -195,6 +195,11 @@
};
AccessibilityControllerImpl();
+
+ AccessibilityControllerImpl(const AccessibilityControllerImpl&) = delete;
+ AccessibilityControllerImpl& operator=(const AccessibilityControllerImpl&) =
+ delete;
+
~AccessibilityControllerImpl() override;
// See Shell::RegisterProfilePrefs().
@@ -579,8 +584,6 @@
base::WeakPtr<AccessibilityConfirmationDialog> confirmation_dialog_;
base::WeakPtrFactory<AccessibilityControllerImpl> weak_ptr_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(AccessibilityControllerImpl);
};
} // namespace ash
diff --git a/ash/accessibility/chromevox/touch_exploration_controller_unittest.cc b/ash/accessibility/chromevox/touch_exploration_controller_unittest.cc
index 5bac394..acafab4 100644
--- a/ash/accessibility/chromevox/touch_exploration_controller_unittest.cc
+++ b/ash/accessibility/chromevox/touch_exploration_controller_unittest.cc
@@ -85,6 +85,11 @@
touch_exploration_controller_.reset(touch_exploration_controller);
}
+ TouchExplorationControllerTestApi(const TouchExplorationControllerTestApi&) =
+ delete;
+ TouchExplorationControllerTestApi& operator=(
+ const TouchExplorationControllerTestApi&) = delete;
+
void CallTapTimerNowForTesting() {
DCHECK(touch_exploration_controller_->tap_timer_.IsRunning());
touch_exploration_controller_->tap_timer_.Stop();
@@ -157,8 +162,6 @@
private:
std::unique_ptr<TouchExplorationController> touch_exploration_controller_;
-
- DISALLOW_COPY_AND_ASSIGN(TouchExplorationControllerTestApi);
};
class TouchExplorationTest : public aura::test::AuraTestBase {
diff --git a/ash/accessibility/sticky_keys/sticky_keys_unittest.cc b/ash/accessibility/sticky_keys/sticky_keys_unittest.cc
index 5c43314..57b64d63 100644
--- a/ash/accessibility/sticky_keys/sticky_keys_unittest.cc
+++ b/ash/accessibility/sticky_keys/sticky_keys_unittest.cc
@@ -16,6 +16,10 @@
namespace ash {
class StickyKeysTest : public AshTestBase {
+ public:
+ StickyKeysTest(const StickyKeysTest&) = delete;
+ StickyKeysTest& operator=(const StickyKeysTest&) = delete;
+
protected:
StickyKeysTest() : target_(NULL), root_window_(NULL) {}
@@ -163,8 +167,6 @@
aura::Window* target_;
// The root window of |target_|. Not owned.
aura::Window* root_window_;
-
- DISALLOW_COPY_AND_ASSIGN(StickyKeysTest);
};
TEST_F(StickyKeysTest, BasicOneshotScenarioTest) {
diff --git a/ash/accessibility/switch_access/point_scan_controller_unittest.cc b/ash/accessibility/switch_access/point_scan_controller_unittest.cc
index d2a1f25..45303bd 100644
--- a/ash/accessibility/switch_access/point_scan_controller_unittest.cc
+++ b/ash/accessibility/switch_access/point_scan_controller_unittest.cc
@@ -20,6 +20,10 @@
namespace ash {
class PointScanControllerTest : public AshTestBase {
+ public:
+ PointScanControllerTest(const PointScanControllerTest&) = delete;
+ PointScanControllerTest& operator=(const PointScanControllerTest&) = delete;
+
protected:
PointScanControllerTest() = default;
~PointScanControllerTest() override = default;
@@ -117,8 +121,6 @@
int diff_count_ = 0;
int row_diff_count_ = 0;
int col_diff_count_ = 0;
-
- DISALLOW_COPY_AND_ASSIGN(PointScanControllerTest);
};
TEST_F(PointScanControllerTest, StartScanning) {
diff --git a/ash/accessibility/ui/accessibility_highlight_controller_unittest.cc b/ash/accessibility/ui/accessibility_highlight_controller_unittest.cc
index 885fec3..3668c6f 100644
--- a/ash/accessibility/ui/accessibility_highlight_controller_unittest.cc
+++ b/ash/accessibility/ui/accessibility_highlight_controller_unittest.cc
@@ -54,6 +54,12 @@
} // namespace
class AccessibilityHighlightControllerTest : public AshTestBase {
+ public:
+ AccessibilityHighlightControllerTest(
+ const AccessibilityHighlightControllerTest&) = delete;
+ AccessibilityHighlightControllerTest& operator=(
+ const AccessibilityHighlightControllerTest&) = delete;
+
protected:
AccessibilityHighlightControllerTest() = default;
~AccessibilityHighlightControllerTest() override = default;
@@ -130,8 +136,6 @@
gfx::Image after_;
int diff_count_ = 0;
SkColor average_diff_color_ = SK_ColorTRANSPARENT;
-
- DISALLOW_COPY_AND_ASSIGN(AccessibilityHighlightControllerTest);
};
TEST_F(AccessibilityHighlightControllerTest, TestCaretRingDrawsBluePixels) {
diff --git a/ash/app_list/folder_image_unittest.cc b/ash/app_list/folder_image_unittest.cc
index 7e610e57..bc73224 100644
--- a/ash/app_list/folder_image_unittest.cc
+++ b/ash/app_list/folder_image_unittest.cc
@@ -39,6 +39,9 @@
public:
TestFolderImageObserver() : updated_flag_(false) {}
+ TestFolderImageObserver(const TestFolderImageObserver&) = delete;
+ TestFolderImageObserver& operator=(const TestFolderImageObserver&) = delete;
+
bool updated() const { return updated_flag_; }
void Reset() { updated_flag_ = false; }
@@ -50,8 +53,6 @@
private:
bool updated_flag_;
-
- DISALLOW_COPY_AND_ASSIGN(TestFolderImageObserver);
};
} // namespace
diff --git a/ash/app_list/model/app_list_test_model.h b/ash/app_list/model/app_list_test_model.h
index 6998d73..c7c47ab 100644
--- a/ash/app_list/model/app_list_test_model.h
+++ b/ash/app_list/model/app_list_test_model.h
@@ -46,6 +46,9 @@
AppListTestModel();
+ AppListTestModel(const AppListTestModel&) = delete;
+ AppListTestModel& operator=(const AppListTestModel&) = delete;
+
// Raw pointer version convenience versions of AppListModel methods.
AppListItem* AddItem(AppListItem* item);
AppListItem* AddItemToFolder(AppListItem* item, const std::string& folder_id);
@@ -87,8 +90,6 @@
int activate_count_ = 0;
AppListItem* last_activated_ = nullptr;
int naming_index_ = 0;
-
- DISALLOW_COPY_AND_ASSIGN(AppListTestModel);
};
} // namespace test
diff --git a/ash/app_list/views/app_list_view.h b/ash/app_list/views/app_list_view.h
index 51e3532..9fc06d5 100644
--- a/ash/app_list/views/app_list_view.h
+++ b/ash/app_list/views/app_list_view.h
@@ -160,6 +160,10 @@
// Does not take ownership of |delegate|.
explicit AppListView(AppListViewDelegate* delegate);
+
+ AppListView(const AppListView&) = delete;
+ AppListView& operator=(const AppListView&) = delete;
+
~AppListView() override;
// Prevents handling input events for the |window| in context of handling in
@@ -653,8 +657,6 @@
// detects that `SetState()` got called again (in which case the weak ptr will
// be invalidated).
base::WeakPtrFactory<AppListView> set_state_weak_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(AppListView);
};
} // namespace ash
diff --git a/ash/app_list/views/assistant/assistant_page_view_unittest.cc b/ash/app_list/views/assistant/assistant_page_view_unittest.cc
index 43127ff..bfd11f3b 100644
--- a/ash/app_list/views/assistant/assistant_page_view_unittest.cc
+++ b/ash/app_list/views/assistant/assistant_page_view_unittest.cc
@@ -163,8 +163,8 @@
base::TimeTicks(),
details) {}
- private:
- DISALLOW_COPY_AND_ASSIGN(GestureEventForTest);
+ GestureEventForTest(const GestureEventForTest&) = delete;
+ GestureEventForTest& operator=(const GestureEventForTest&) = delete;
};
// Base class for tests of the embedded assistant page in:
@@ -175,6 +175,9 @@
public:
AssistantPageViewTest() = default;
+ AssistantPageViewTest(const AssistantPageViewTest&) = delete;
+ AssistantPageViewTest& operator=(const AssistantPageViewTest&) = delete;
+
void ShowAssistantUiInTextMode() {
ShowAssistantUi(AssistantEntryPoint::kUnspecified);
EXPECT_TRUE(IsVisible());
@@ -207,9 +210,6 @@
SetNumberOfSessionsWhereOnboardingShown(
assistant::ui::kOnboardingMaxSessionsShown);
}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(AssistantPageViewTest);
};
// Tests for the legacy non-bubble app list ("peeking launcher").
@@ -993,6 +993,11 @@
public:
AssistantPageViewTabletModeTest() = default;
+ AssistantPageViewTabletModeTest(const AssistantPageViewTabletModeTest&) =
+ delete;
+ AssistantPageViewTabletModeTest& operator=(
+ const AssistantPageViewTabletModeTest&) = delete;
+
void SetUp() override {
AssistantPageViewTest::SetUp();
SetTabletMode(true);
@@ -1030,9 +1035,6 @@
gfx::Point GetPointInside(const views::View* view) {
return view->GetBoundsInScreen().CenterPoint();
}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(AssistantPageViewTabletModeTest);
};
TEST_F(AssistantPageViewTabletModeTest,
diff --git a/ash/app_list/views/contents_view.h b/ash/app_list/views/contents_view.h
index 6f8f7f4..4f6ad48 100644
--- a/ash/app_list/views/contents_view.h
+++ b/ash/app_list/views/contents_view.h
@@ -73,6 +73,10 @@
};
explicit ContentsView(AppListView* app_list_view);
+
+ ContentsView(const ContentsView&) = delete;
+ ContentsView& operator=(const ContentsView&) = delete;
+
~ContentsView() override;
// Initialize the pages of the launcher. Should be called after
@@ -304,8 +308,6 @@
// to a new app list view state.
absl::optional<AppListState> target_page_for_last_view_state_update_;
absl::optional<AppListViewState> last_target_view_state_;
-
- DISALLOW_COPY_AND_ASSIGN(ContentsView);
};
} // namespace ash
diff --git a/ash/app_list/views/result_selection_controller_unittest.cc b/ash/app_list/views/result_selection_controller_unittest.cc
index 73e17a8..51b4988 100644
--- a/ash/app_list/views/result_selection_controller_unittest.cc
+++ b/ash/app_list/views/result_selection_controller_unittest.cc
@@ -52,6 +52,10 @@
set_actions_view(actions_view_owned_.get());
}
+ TestResultViewWithActions(const TestResultViewWithActions&) = delete;
+ TestResultViewWithActions& operator=(const TestResultViewWithActions&) =
+ delete;
+
// TestResultView:
TestResultViewWithActions* AsResultViewWithActions() override { return this; }
@@ -65,8 +69,6 @@
private:
std::unique_ptr<SearchResultActionsView> actions_view_owned_;
-
- DISALLOW_COPY_AND_ASSIGN(TestResultViewWithActions);
};
// Allows immediate invocation of |VerticalTestContainer| and its derivatives,
diff --git a/ash/app_list/views/search_result_base_view.h b/ash/app_list/views/search_result_base_view.h
index c459841..8075c4e 100644
--- a/ash/app_list/views/search_result_base_view.h
+++ b/ash/app_list/views/search_result_base_view.h
@@ -21,6 +21,9 @@
public:
SearchResultBaseView();
+ SearchResultBaseView(const SearchResultBaseView&) = delete;
+ SearchResultBaseView& operator=(const SearchResultBaseView&) = delete;
+
// Set whether the result is selected. It updates the background highlight,
// and selects the result action associated with the result if
// SearchBoxSelection feature is enabled.
@@ -128,8 +131,6 @@
// activated by user by pressing ENTER key.
bool is_default_result_ = false;
SearchResult* result_ = nullptr; // Owned by SearchModel::SearchResults.
-
- DISALLOW_COPY_AND_ASSIGN(SearchResultBaseView);
};
} // namespace ash
diff --git a/ash/app_menu/notification_menu_controller_unittest.cc b/ash/app_menu/notification_menu_controller_unittest.cc
index d9c0673..13a9af6 100644
--- a/ash/app_menu/notification_menu_controller_unittest.cc
+++ b/ash/app_menu/notification_menu_controller_unittest.cc
@@ -42,11 +42,12 @@
base::OnceClosure(),
false /* is_tablet_mode */) {}
+ TestAppMenuModelAdapter(const TestAppMenuModelAdapter&) = delete;
+ TestAppMenuModelAdapter& operator=(const TestAppMenuModelAdapter&) = delete;
+
private:
// AppMenuModelAdapter overrides:
void RecordHistogramOnMenuClosed() override {}
-
- DISALLOW_COPY_AND_ASSIGN(TestAppMenuModelAdapter);
};
} // namespace
diff --git a/ash/assistant/assistant_alarm_timer_controller_unittest.cc b/ash/assistant/assistant_alarm_timer_controller_unittest.cc
index 073a8a6..79e05591 100644
--- a/ash/assistant/assistant_alarm_timer_controller_unittest.cc
+++ b/ash/assistant/assistant_alarm_timer_controller_unittest.cc
@@ -334,6 +334,11 @@
: AssistantAshTestBase(
base::test::TaskEnvironment::TimeSource::MOCK_TIME) {}
+ AssistantAlarmTimerControllerTest(const AssistantAlarmTimerControllerTest&) =
+ delete;
+ AssistantAlarmTimerControllerTest& operator=(
+ const AssistantAlarmTimerControllerTest&) = delete;
+
~AssistantAlarmTimerControllerTest() override = default;
// AshTestBase:
@@ -370,9 +375,6 @@
AssistantAlarmTimerController* controller() {
return AssistantAlarmTimerController::Get();
}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(AssistantAlarmTimerControllerTest);
};
// Tests -----------------------------------------------------------------------
diff --git a/ash/assistant/assistant_notification_controller_impl_unittest.cc b/ash/assistant/assistant_notification_controller_impl_unittest.cc
index 0f59d07..21b262cd 100644
--- a/ash/assistant/assistant_notification_controller_impl_unittest.cc
+++ b/ash/assistant/assistant_notification_controller_impl_unittest.cc
@@ -200,6 +200,12 @@
// AssistantNotificationControllerTest -----------------------------------------
class AssistantNotificationControllerTest : public AshTestBase {
+ public:
+ AssistantNotificationControllerTest(
+ const AssistantNotificationControllerTest&) = delete;
+ AssistantNotificationControllerTest& operator=(
+ const AssistantNotificationControllerTest&) = delete;
+
protected:
AssistantNotificationControllerTest()
: AshTestBase(base::test::TaskEnvironment::TimeSource::MOCK_TIME) {}
@@ -238,8 +244,6 @@
private:
AssistantNotificationControllerImpl* controller_;
std::unique_ptr<AssistantNotificationModelObserverMock> observer_;
-
- DISALLOW_COPY_AND_ASSIGN(AssistantNotificationControllerTest);
};
} // namespace
diff --git a/ash/assistant/assistant_screen_context_controller_impl_unittest.cc b/ash/assistant/assistant_screen_context_controller_impl_unittest.cc
index e4e701a..ca88030b 100644
--- a/ash/assistant/assistant_screen_context_controller_impl_unittest.cc
+++ b/ash/assistant/assistant_screen_context_controller_impl_unittest.cc
@@ -41,6 +41,12 @@
} // namespace
class AssistantScreenContextControllerTest : public AssistantAshTestBase {
+ public:
+ AssistantScreenContextControllerTest(
+ const AssistantScreenContextControllerTest&) = delete;
+ AssistantScreenContextControllerTest& operator=(
+ const AssistantScreenContextControllerTest&) = delete;
+
protected:
AssistantScreenContextControllerTest()
: AssistantAshTestBase(
@@ -95,8 +101,6 @@
private:
AssistantScreenContextControllerImpl* controller_ = nullptr;
-
- DISALLOW_COPY_AND_ASSIGN(AssistantScreenContextControllerTest);
};
// Verify that incognito windows are blocked in screenshot.
diff --git a/ash/assistant/assistant_state_controller_unittest.cc b/ash/assistant/assistant_state_controller_unittest.cc
index 2e2a6ea..f535d7f9 100644
--- a/ash/assistant/assistant_state_controller_unittest.cc
+++ b/ash/assistant/assistant_state_controller_unittest.cc
@@ -90,6 +90,11 @@
};
class AssistantStateControllerTest : public AshTestBase {
+ public:
+ AssistantStateControllerTest(const AssistantStateControllerTest&) = delete;
+ AssistantStateControllerTest& operator=(const AssistantStateControllerTest&) =
+ delete;
+
protected:
AssistantStateControllerTest() = default;
~AssistantStateControllerTest() override = default;
@@ -111,8 +116,6 @@
private:
PrefService* prefs_ = nullptr;
std::unique_ptr<TestAssistantStateObserver> observer_;
-
- DISALLOW_COPY_AND_ASSIGN(AssistantStateControllerTest);
};
} // namespace
diff --git a/ash/assistant/model/assistant_interaction_model_observer.h b/ash/assistant/model/assistant_interaction_model_observer.h
index b82c41dc..884d5fc 100644
--- a/ash/assistant/model/assistant_interaction_model_observer.h
+++ b/ash/assistant/model/assistant_interaction_model_observer.h
@@ -23,6 +23,11 @@
class COMPONENT_EXPORT(ASSISTANT_MODEL) AssistantInteractionModelObserver
: public base::CheckedObserver {
public:
+ AssistantInteractionModelObserver(const AssistantInteractionModelObserver&) =
+ delete;
+ AssistantInteractionModelObserver& operator=(
+ const AssistantInteractionModelObserver&) = delete;
+
// Invoked when the interaction state is changed.
virtual void OnInteractionStateChanged(InteractionState interaction_state) {}
@@ -60,8 +65,6 @@
protected:
AssistantInteractionModelObserver() = default;
~AssistantInteractionModelObserver() override = default;
-
- DISALLOW_COPY_AND_ASSIGN(AssistantInteractionModelObserver);
};
} // namespace ash
diff --git a/ash/assistant/model/assistant_query_history.h b/ash/assistant/model/assistant_query_history.h
index a1eaafb9..f69a312 100644
--- a/ash/assistant/model/assistant_query_history.h
+++ b/ash/assistant/model/assistant_query_history.h
@@ -45,6 +45,10 @@
};
AssistantQueryHistory(int capacity = 100);
+
+ AssistantQueryHistory(const AssistantQueryHistory&) = delete;
+ AssistantQueryHistory& operator=(const AssistantQueryHistory&) = delete;
+
~AssistantQueryHistory();
// Gets the iterator of query history.
@@ -56,8 +60,6 @@
private:
const int capacity_;
base::circular_deque<std::string> queries_;
-
- DISALLOW_COPY_AND_ASSIGN(AssistantQueryHistory);
};
} // namespace ash
diff --git a/ash/assistant/model/assistant_response.h b/ash/assistant/model/assistant_response.h
index 1aa25c2d..b8181db 100644
--- a/ash/assistant/model/assistant_response.h
+++ b/ash/assistant/model/assistant_response.h
@@ -43,6 +43,9 @@
AssistantResponse();
+ AssistantResponse(const AssistantResponse&) = delete;
+ AssistantResponse& operator=(const AssistantResponse&) = delete;
+
// Adds/removes the specified |observer|.
// NOTE: only the AssistantInteractionController is able to obtain non-const
// access to an AssistantResponse through its owned model, but there are const
@@ -120,8 +123,6 @@
mutable base::ObserverList<AssistantResponseObserver> observers_;
base::WeakPtrFactory<AssistantResponse> weak_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(AssistantResponse);
};
} // namespace ash
diff --git a/ash/assistant/model/assistant_screen_context_model_observer.h b/ash/assistant/model/assistant_screen_context_model_observer.h
index de8dfc5..7e82057 100644
--- a/ash/assistant/model/assistant_screen_context_model_observer.h
+++ b/ash/assistant/model/assistant_screen_context_model_observer.h
@@ -18,6 +18,11 @@
class COMPONENT_EXPORT(ASSISTANT_MODEL) AssistantScreenContextModelObserver
: public base::CheckedObserver {
public:
+ AssistantScreenContextModelObserver(
+ const AssistantScreenContextModelObserver&) = delete;
+ AssistantScreenContextModelObserver& operator=(
+ const AssistantScreenContextModelObserver&) = delete;
+
// Invoked when the screen context request state is changed.
virtual void OnScreenContextRequestStateChanged(
ScreenContextRequestState request_state) {}
@@ -25,8 +30,6 @@
protected:
AssistantScreenContextModelObserver() = default;
~AssistantScreenContextModelObserver() override = default;
-
- DISALLOW_COPY_AND_ASSIGN(AssistantScreenContextModelObserver);
};
} // namespace ash
diff --git a/ash/assistant/model/assistant_ui_model_observer.h b/ash/assistant/model/assistant_ui_model_observer.h
index 35ce9f1..6243ffa 100644
--- a/ash/assistant/model/assistant_ui_model_observer.h
+++ b/ash/assistant/model/assistant_ui_model_observer.h
@@ -31,6 +31,9 @@
using AssistantEntryPoint = chromeos::assistant::AssistantEntryPoint;
using AssistantExitPoint = chromeos::assistant::AssistantExitPoint;
+ AssistantUiModelObserver(const AssistantUiModelObserver&) = delete;
+ AssistantUiModelObserver& operator=(const AssistantUiModelObserver&) = delete;
+
// Invoked when the UI mode is changed. If |due_to_interaction| is true, the
// UI mode was changed as a result of an Assistant interaction.
virtual void OnUiModeChanged(AssistantUiMode ui_mode,
@@ -53,8 +56,6 @@
protected:
AssistantUiModelObserver() = default;
~AssistantUiModelObserver() override = default;
-
- DISALLOW_COPY_AND_ASSIGN(AssistantUiModelObserver);
};
} // namespace ash
diff --git a/ash/child_accounts/parent_access_controller_impl_unittest.cc b/ash/child_accounts/parent_access_controller_impl_unittest.cc
index 3ff0879..be716cd 100644
--- a/ash/child_accounts/parent_access_controller_impl_unittest.cc
+++ b/ash/child_accounts/parent_access_controller_impl_unittest.cc
@@ -33,6 +33,12 @@
}
class ParentAccessControllerImplTest : public LoginTestBase {
+ public:
+ ParentAccessControllerImplTest(const ParentAccessControllerImplTest&) =
+ delete;
+ ParentAccessControllerImplTest& operator=(
+ const ParentAccessControllerImplTest&) = delete;
+
protected:
ParentAccessControllerImplTest() : account_id_(GetChildAccountId()) {}
~ParentAccessControllerImplTest() override = default;
@@ -157,9 +163,6 @@
base::HistogramTester histogram_tester_;
PinRequestView* view_ = nullptr; // Owned by test widget view hierarchy.
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ParentAccessControllerImplTest);
};
// Tests parent access dialog showing/hiding and focus behavior for parent
diff --git a/ash/components/audio/audio_devices_pref_handler_impl.h b/ash/components/audio/audio_devices_pref_handler_impl.h
index 1f51de3..da65359 100644
--- a/ash/components/audio/audio_devices_pref_handler_impl.h
+++ b/ash/components/audio/audio_devices_pref_handler_impl.h
@@ -28,6 +28,10 @@
// |local_state| is the device-wide preference service.
explicit AudioDevicesPrefHandlerImpl(PrefService* local_state);
+ AudioDevicesPrefHandlerImpl(const AudioDevicesPrefHandlerImpl&) = delete;
+ AudioDevicesPrefHandlerImpl& operator=(const AudioDevicesPrefHandlerImpl&) =
+ delete;
+
// Overridden from AudioDevicesPrefHandler.
double GetOutputVolumeValue(const AudioDevice* device) override;
double GetInputGainValue(const AudioDevice* device) override;
@@ -120,8 +124,6 @@
PrefChangeRegistrar pref_change_registrar_;
base::ObserverList<AudioPrefObserver>::Unchecked observers_;
-
- DISALLOW_COPY_AND_ASSIGN(AudioDevicesPrefHandlerImpl);
};
} // namespace ash
diff --git a/ash/components/audio/audio_devices_pref_handler_stub.h b/ash/components/audio/audio_devices_pref_handler_stub.h
index 9b754c0d..ceea09a 100644
--- a/ash/components/audio/audio_devices_pref_handler_stub.h
+++ b/ash/components/audio/audio_devices_pref_handler_stub.h
@@ -30,6 +30,10 @@
AudioDevicesPrefHandlerStub();
+ AudioDevicesPrefHandlerStub(const AudioDevicesPrefHandlerStub&) = delete;
+ AudioDevicesPrefHandlerStub& operator=(const AudioDevicesPrefHandlerStub&) =
+ delete;
+
// AudioDevicesPrefHandler:
double GetOutputVolumeValue(const AudioDevice* device) override;
double GetInputGainValue(const AudioDevice* device) override;
@@ -58,8 +62,6 @@
AudioDeviceStateMap audio_device_state_map_;
bool noise_cancellation_state_ = true;
-
- DISALLOW_COPY_AND_ASSIGN(AudioDevicesPrefHandlerStub);
};
} // namespace ash
diff --git a/ash/components/audio/cras_audio_handler.h b/ash/components/audio/cras_audio_handler.h
index a617310..2a74f2f2 100644
--- a/ash/components/audio/cras_audio_handler.h
+++ b/ash/components/audio/cras_audio_handler.h
@@ -67,6 +67,9 @@
class AudioObserver {
public:
+ AudioObserver(const AudioObserver&) = delete;
+ AudioObserver& operator=(const AudioObserver&) = delete;
+
// Called when an active output volume changed.
virtual void OnOutputNodeVolumeChanged(uint64_t node_id, int volume);
@@ -119,7 +122,6 @@
protected:
AudioObserver();
virtual ~AudioObserver();
- DISALLOW_COPY_AND_ASSIGN(AudioObserver);
};
enum DeviceActivateType {
@@ -155,6 +157,9 @@
// Gets the global instance. Initialize must be called first.
static CrasAudioHandler* Get();
+ CrasAudioHandler(const CrasAudioHandler&) = delete;
+ CrasAudioHandler& operator=(const CrasAudioHandler&) = delete;
+
// Overrides media::VideoCaptureObserver.
void OnVideoCaptureStarted(media::VideoFacingMode facing) override;
void OnVideoCaptureStopped(media::VideoFacingMode facing) override;
@@ -753,8 +758,6 @@
cras::DisplayRotation display_rotation_ = cras::DisplayRotation::ROTATE_0;
base::WeakPtrFactory<CrasAudioHandler> weak_ptr_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(CrasAudioHandler);
};
// Helper class that will initialize the |CrasAudioHandler| for testing in its
diff --git a/ash/components/audio/cras_audio_handler_unittest.cc b/ash/components/audio/cras_audio_handler_unittest.cc
index 11b636d8..f33936e 100644
--- a/ash/components/audio/cras_audio_handler_unittest.cc
+++ b/ash/components/audio/cras_audio_handler_unittest.cc
@@ -42,6 +42,10 @@
public:
FakeMediaControllerManager() = default;
+ FakeMediaControllerManager(const FakeMediaControllerManager&) = delete;
+ FakeMediaControllerManager& operator=(const FakeMediaControllerManager&) =
+ delete;
+
mojo::PendingRemote<media_session::mojom::MediaControllerManager>
MakeRemote() {
mojo::PendingRemote<media_session::mojom::MediaControllerManager> remote;
@@ -63,8 +67,6 @@
}
mojo::ReceiverSet<media_session::mojom::MediaControllerManager> receivers_;
-
- DISALLOW_COPY_AND_ASSIGN(FakeMediaControllerManager);
};
const uint64_t kInternalSpeakerId = 10001;
@@ -509,6 +511,9 @@
: cras_audio_handler_test_(cras_audio_handler_test),
grace_period_duration_in_ms_(grace_period_duration_in_ms) {}
+ HDMIRediscoverWaiter(const HDMIRediscoverWaiter&) = delete;
+ HDMIRediscoverWaiter& operator=(const HDMIRediscoverWaiter&) = delete;
+
void WaitUntilTimeOut(int wait_duration_in_ms) {
base::RunLoop run_loop;
base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
@@ -538,8 +543,6 @@
private:
CrasAudioHandlerTest* cras_audio_handler_test_; // not owned
int grace_period_duration_in_ms_;
-
- DISALLOW_COPY_AND_ASSIGN(HDMIRediscoverWaiter);
};
INSTANTIATE_TEST_SUITE_P(StableIdV1, CrasAudioHandlerTest, testing::Values(1));
diff --git a/ash/components/drivefs/drivefs_auth_unittest.cc b/ash/components/drivefs/drivefs_auth_unittest.cc
index 0df996e..f43336ef 100644
--- a/ash/components/drivefs/drivefs_auth_unittest.cc
+++ b/ash/components/drivefs/drivefs_auth_unittest.cc
@@ -65,6 +65,9 @@
public:
DriveFsAuthTest() = default;
+ DriveFsAuthTest(const DriveFsAuthTest&) = delete;
+ DriveFsAuthTest& operator=(const DriveFsAuthTest&) = delete;
+
protected:
void SetUp() override {
clock_.SetNow(base::Time::Now());
@@ -104,9 +107,6 @@
std::unique_ptr<AuthDelegateImpl> delegate_;
std::unique_ptr<DriveFsAuth> auth_;
base::MockOneShotTimer* timer_ = nullptr;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(DriveFsAuthTest);
};
TEST_F(DriveFsAuthTest, GetAccessToken_Success) {
diff --git a/ash/components/drivefs/drivefs_bootstrap_unittest.cc b/ash/components/drivefs/drivefs_bootstrap_unittest.cc
index 94b8c2c..7451256 100644
--- a/ash/components/drivefs/drivefs_bootstrap_unittest.cc
+++ b/ash/components/drivefs/drivefs_bootstrap_unittest.cc
@@ -47,6 +47,11 @@
mojo::PendingRemote<mojom::DriveFsBootstrap> available_bootstrap)
: available_bootstrap_(std::move(available_bootstrap)) {}
+ DriveFsBootstrapListenerForTest(const DriveFsBootstrapListenerForTest&) =
+ delete;
+ DriveFsBootstrapListenerForTest& operator=(
+ const DriveFsBootstrapListenerForTest&) = delete;
+
mojo::PendingRemote<mojom::DriveFsBootstrap> bootstrap() override {
return std::move(available_bootstrap_);
}
@@ -55,8 +60,6 @@
private:
mojo::PendingRemote<mojom::DriveFsBootstrap> available_bootstrap_;
-
- DISALLOW_COPY_AND_ASSIGN(DriveFsBootstrapListenerForTest);
};
class DriveFsBootstrapTest : public testing::Test,
@@ -64,6 +67,9 @@
public:
DriveFsBootstrapTest() = default;
+ DriveFsBootstrapTest(const DriveFsBootstrapTest&) = delete;
+ DriveFsBootstrapTest& operator=(const DriveFsBootstrapTest&) = delete;
+
protected:
MOCK_CONST_METHOD0(OnDisconnect, void());
MOCK_CONST_METHOD0(OnInit, void());
@@ -108,8 +114,6 @@
mojo::Remote<mojom::DriveFsDelegate> delegate_;
mojo::PendingReceiver<mojom::DriveFsDelegate> pending_delegate_receiver_;
std::string email_;
-
- DISALLOW_COPY_AND_ASSIGN(DriveFsBootstrapTest);
};
} // namespace
diff --git a/ash/components/drivefs/drivefs_host_unittest.cc b/ash/components/drivefs/drivefs_host_unittest.cc
index 05b5602..1f306bdd 100644
--- a/ash/components/drivefs/drivefs_host_unittest.cc
+++ b/ash/components/drivefs/drivefs_host_unittest.cc
@@ -202,6 +202,9 @@
clock_.SetNow(base::Time::Now());
}
+ DriveFsHostTest(const DriveFsHostTest&) = delete;
+ DriveFsHostTest& operator=(const DriveFsHostTest&) = delete;
+
protected:
void SetUp() override {
testing::Test::SetUp();
@@ -344,9 +347,6 @@
mojo::PendingReceiver<mojom::DriveFsDelegate> pending_delegate_receiver_;
std::string token_;
absl::optional<std::string> init_access_token_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(DriveFsHostTest);
};
TEST_F(DriveFsHostTest, Basic) {
diff --git a/ash/components/drivefs/drivefs_search_unittest.cc b/ash/components/drivefs/drivefs_search_unittest.cc
index b2ca00f1f..844906f 100644
--- a/ash/components/drivefs/drivefs_search_unittest.cc
+++ b/ash/components/drivefs/drivefs_search_unittest.cc
@@ -28,6 +28,9 @@
public:
MockDriveFs() = default;
+ MockDriveFs(const MockDriveFs&) = delete;
+ MockDriveFs& operator=(const MockDriveFs&) = delete;
+
DriveFs* GetForwardingInterface() override {
NOTREACHED();
return nullptr;
@@ -53,7 +56,6 @@
private:
mojo::Receiver<mojom::SearchQuery> search_receiver_{this};
- DISALLOW_COPY_AND_ASSIGN(MockDriveFs);
};
class DriveFsSearchTest : public testing::Test {
diff --git a/ash/components/drivefs/drivefs_session_unittest.cc b/ash/components/drivefs/drivefs_session_unittest.cc
index 8e183a62..c88dbc8c 100644
--- a/ash/components/drivefs/drivefs_session_unittest.cc
+++ b/ash/components/drivefs/drivefs_session_unittest.cc
@@ -286,6 +286,9 @@
public:
DriveFsSessionTest() {}
+ DriveFsSessionTest(const DriveFsSessionTest&) = delete;
+ DriveFsSessionTest& operator=(const DriveFsSessionTest&) = delete;
+
protected:
MOCK_METHOD1(OnMounted, void(const base::FilePath& path));
MOCK_METHOD1(OnUnmounted, void(absl::optional<base::TimeDelta> delay));
@@ -344,9 +347,6 @@
base::MockOneShotTimer timer_;
std::unique_ptr<PointerHolder> holder_;
std::unique_ptr<DriveFsSession> session_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(DriveFsSessionTest);
};
} // namespace
diff --git a/ash/components/drivefs/fake_drivefs.cc b/ash/components/drivefs/fake_drivefs.cc
index 9610f7a1..77dec10 100644
--- a/ash/components/drivefs/fake_drivefs.cc
+++ b/ash/components/drivefs/fake_drivefs.cc
@@ -107,6 +107,9 @@
drivefs::mojom::QueryParametersPtr params)
: drive_fs_(std::move(drive_fs)), params_(std::move(params)) {}
+ SearchQuery(const SearchQuery&) = delete;
+ SearchQuery& operator=(const SearchQuery&) = delete;
+
private:
void GetNextPage(GetNextPageCallback callback) override {
if (!drive_fs_) {
@@ -234,8 +237,6 @@
size_t pending_callbacks_ = 0;
base::WeakPtrFactory<SearchQuery> weak_ptr_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(SearchQuery);
};
FakeDriveFs::FakeDriveFs(const base::FilePath& mount_path)
diff --git a/ash/components/drivefs/fake_drivefs_launcher_client.h b/ash/components/drivefs/fake_drivefs_launcher_client.h
index fb48e19..29054ed 100644
--- a/ash/components/drivefs/fake_drivefs_launcher_client.h
+++ b/ash/components/drivefs/fake_drivefs_launcher_client.h
@@ -20,6 +20,10 @@
static void Init(const base::FilePath& socket_path,
const base::FilePath& chroot_path);
+ FakeDriveFsLauncherClient(const FakeDriveFsLauncherClient&) = delete;
+ FakeDriveFsLauncherClient& operator=(const FakeDriveFsLauncherClient&) =
+ delete;
+
private:
friend class base::NoDestructor<FakeDriveFsLauncherClient>;
@@ -35,8 +39,6 @@
const base::FilePath socket_path_;
mojo::Remote<mojom::FakeDriveFsLauncher> launcher_;
-
- DISALLOW_COPY_AND_ASSIGN(FakeDriveFsLauncherClient);
};
} // namespace drivefs
diff --git a/ash/display/cros_display_config_unittest.cc b/ash/display/cros_display_config_unittest.cc
index a77a99b3..80a4451 100644
--- a/ash/display/cros_display_config_unittest.cc
+++ b/ash/display/cros_display_config_unittest.cc
@@ -63,6 +63,9 @@
public:
TestObserver() = default;
+ TestObserver(const TestObserver&) = delete;
+ TestObserver& operator=(const TestObserver&) = delete;
+
// mojom::CrosDisplayConfigObserver:
void OnDisplayConfigChanged() override { display_changes_++; }
@@ -71,8 +74,6 @@
private:
int display_changes_ = 0;
-
- DISALLOW_COPY_AND_ASSIGN(TestObserver);
};
} // namespace
diff --git a/ash/display/cursor_window_controller.h b/ash/display/cursor_window_controller.h
index f936676..63c7ba79 100644
--- a/ash/display/cursor_window_controller.h
+++ b/ash/display/cursor_window_controller.h
@@ -44,6 +44,10 @@
};
CursorWindowController();
+
+ CursorWindowController(const CursorWindowController&) = delete;
+ CursorWindowController& operator=(const CursorWindowController&) = delete;
+
~CursorWindowController();
bool is_cursor_compositing_enabled() const {
@@ -137,8 +141,6 @@
views::UniqueWidgetPtr cursor_view_widget_;
const bool is_cursor_motion_blur_enabled_;
-
- DISALLOW_COPY_AND_ASSIGN(CursorWindowController);
};
} // namespace ash
diff --git a/ash/display/display_animator.cc b/ash/display/display_animator.cc
index 5c0a17ae..e6545f13 100644
--- a/ash/display/display_animator.cc
+++ b/ash/display/display_animator.cc
@@ -35,6 +35,9 @@
animation_aborted_(false),
callback_(std::move(callback)) {}
+ CallbackRunningObserver(const CallbackRunningObserver&) = delete;
+ CallbackRunningObserver& operator=(const CallbackRunningObserver&) = delete;
+
void AddNewAnimator(ui::LayerAnimator* animator) {
auto observer = std::make_unique<Observer>(animator, this);
animator->AddObserver(observer.get());
@@ -63,6 +66,9 @@
Observer(ui::LayerAnimator* animator, CallbackRunningObserver* observer)
: animator_(animator), observer_(observer) {}
+ Observer(const Observer&) = delete;
+ Observer& operator=(const Observer&) = delete;
+
protected:
// ui::LayerAnimationObserver overrides:
void OnLayerAnimationEnded(ui::LayerAnimationSequence* sequence) override {
@@ -83,16 +89,12 @@
private:
ui::LayerAnimator* animator_;
CallbackRunningObserver* observer_;
-
- DISALLOW_COPY_AND_ASSIGN(Observer);
};
size_t completed_counter_;
bool animation_aborted_;
std::vector<std::unique_ptr<Observer>> observer_list_;
base::OnceClosure callback_;
-
- DISALLOW_COPY_AND_ASSIGN(CallbackRunningObserver);
};
} // namespace
diff --git a/ash/display/display_color_manager_unittest.cc b/ash/display/display_color_manager_unittest.cc
index 6c9b9a5..2a88874 100644
--- a/ash/display/display_color_manager_unittest.cc
+++ b/ash/display/display_color_manager_unittest.cc
@@ -39,6 +39,10 @@
display::DisplayConfigurator* configurator)
: DisplayColorManager(configurator) {}
+ DisplayColorManagerForTest(const DisplayColorManagerForTest&) = delete;
+ DisplayColorManagerForTest& operator=(const DisplayColorManagerForTest&) =
+ delete;
+
void SetOnFinishedForTest(base::OnceClosure on_finished_for_test) {
on_finished_for_test_ = std::move(on_finished_for_test);
}
@@ -73,8 +77,6 @@
}
base::OnceClosure on_finished_for_test_;
-
- DISALLOW_COPY_AND_ASSIGN(DisplayColorManagerForTest);
};
// Implementation of QuirksManager::Delegate to fake chrome-restricted parts.
@@ -83,6 +85,10 @@
QuirksManagerDelegateTestImpl(base::FilePath color_path)
: color_path_(color_path) {}
+ QuirksManagerDelegateTestImpl(const QuirksManagerDelegateTestImpl&) = delete;
+ QuirksManagerDelegateTestImpl& operator=(
+ const QuirksManagerDelegateTestImpl&) = delete;
+
// Unused by these tests.
std::string GetApiKey() const override { return std::string(); }
@@ -96,8 +102,6 @@
~QuirksManagerDelegateTestImpl() override = default;
base::FilePath color_path_;
-
- DISALLOW_COPY_AND_ASSIGN(QuirksManagerDelegateTestImpl);
};
} // namespace
diff --git a/ash/display/display_configuration_controller.cc b/ash/display/display_configuration_controller.cc
index 7d41f6dd..3b3b071 100644
--- a/ash/display/display_configuration_controller.cc
+++ b/ash/display/display_configuration_controller.cc
@@ -64,6 +64,9 @@
public:
DisplayChangeLimiter() : throttle_timeout_(base::Time::Now()) {}
+ DisplayChangeLimiter(const DisplayChangeLimiter&) = delete;
+ DisplayChangeLimiter& operator=(const DisplayChangeLimiter&) = delete;
+
void SetThrottleTimeout(int64_t throttle_ms) {
throttle_timeout_ =
base::Time::Now() + base::TimeDelta::FromMilliseconds(throttle_ms);
@@ -73,8 +76,6 @@
private:
base::Time throttle_timeout_;
-
- DISALLOW_COPY_AND_ASSIGN(DisplayChangeLimiter);
};
// static
diff --git a/ash/display/display_configuration_controller_test_api.h b/ash/display/display_configuration_controller_test_api.h
index 0a4e6f4..9f888fc 100644
--- a/ash/display/display_configuration_controller_test_api.h
+++ b/ash/display/display_configuration_controller_test_api.h
@@ -21,6 +21,11 @@
explicit DisplayConfigurationControllerTestApi(
DisplayConfigurationController* controller);
+ DisplayConfigurationControllerTestApi(
+ const DisplayConfigurationControllerTestApi&) = delete;
+ DisplayConfigurationControllerTestApi& operator=(
+ const DisplayConfigurationControllerTestApi&) = delete;
+
// Wrapper functions for DisplayConfigurationController.
void SetDisplayAnimator(bool enable);
ScreenRotationAnimator* GetScreenRotationAnimatorForDisplay(
@@ -32,8 +37,6 @@
private:
DisplayConfigurationController* controller_;
-
- DISALLOW_COPY_AND_ASSIGN(DisplayConfigurationControllerTestApi);
};
} // namespace ash
diff --git a/ash/display/display_error_observer_unittest.cc b/ash/display/display_error_observer_unittest.cc
index e693b12..cf5aaf5 100644
--- a/ash/display/display_error_observer_unittest.cc
+++ b/ash/display/display_error_observer_unittest.cc
@@ -19,6 +19,10 @@
namespace ash {
class DisplayErrorObserverTest : public AshTestBase {
+ public:
+ DisplayErrorObserverTest(const DisplayErrorObserverTest&) = delete;
+ DisplayErrorObserverTest& operator=(const DisplayErrorObserverTest&) = delete;
+
protected:
DisplayErrorObserverTest() = default;
@@ -38,8 +42,6 @@
private:
std::unique_ptr<DisplayErrorObserver> observer_;
-
- DISALLOW_COPY_AND_ASSIGN(DisplayErrorObserverTest);
};
TEST_F(DisplayErrorObserverTest, Normal) {
diff --git a/ash/display/display_prefs_unittest.cc b/ash/display/display_prefs_unittest.cc
index 2ec2eb0..82df615 100644
--- a/ash/display/display_prefs_unittest.cc
+++ b/ash/display/display_prefs_unittest.cc
@@ -111,6 +111,10 @@
} // namespace
class DisplayPrefsTest : public AshTestBase {
+ public:
+ DisplayPrefsTest(const DisplayPrefsTest&) = delete;
+ DisplayPrefsTest& operator=(const DisplayPrefsTest&) = delete;
+
protected:
DisplayPrefsTest() = default;
~DisplayPrefsTest() override = default;
@@ -240,16 +244,14 @@
private:
std::unique_ptr<WindowTreeHostManager::Observer> observer_;
base::test::ScopedFeatureList scoped_feature_list_;
-
- DISALLOW_COPY_AND_ASSIGN(DisplayPrefsTest);
};
class DisplayPrefsTestGuest : public DisplayPrefsTest {
public:
DisplayPrefsTestGuest() { set_start_session(false); }
- private:
- DISALLOW_COPY_AND_ASSIGN(DisplayPrefsTestGuest);
+ DisplayPrefsTestGuest(const DisplayPrefsTestGuest&) = delete;
+ DisplayPrefsTestGuest& operator=(const DisplayPrefsTestGuest&) = delete;
};
TEST_F(DisplayPrefsTest, ListedLayoutOverrides) {
diff --git a/ash/display/mirror_window_controller.cc b/ash/display/mirror_window_controller.cc
index 4bbba73..94a10a8 100644
--- a/ash/display/mirror_window_controller.cc
+++ b/ash/display/mirror_window_controller.cc
@@ -45,6 +45,10 @@
explicit MirroringScreenPositionClient(MirrorWindowController* controller)
: controller_(controller) {}
+ MirroringScreenPositionClient(const MirroringScreenPositionClient&) = delete;
+ MirroringScreenPositionClient& operator=(
+ const MirroringScreenPositionClient&) = delete;
+
// aura::client::ScreenPositionClient:
void ConvertPointToScreen(const aura::Window* window,
gfx::PointF* point) override {
@@ -93,8 +97,6 @@
private:
MirrorWindowController* controller_; // not owned.
-
- DISALLOW_COPY_AND_ASSIGN(MirroringScreenPositionClient);
};
// A trivial CaptureClient that does nothing. That is, calls to set/release
diff --git a/ash/display/null_mouse_warp_controller.h b/ash/display/null_mouse_warp_controller.h
index 85ff488e..1e81194 100644
--- a/ash/display/null_mouse_warp_controller.h
+++ b/ash/display/null_mouse_warp_controller.h
@@ -17,12 +17,12 @@
public:
NullMouseWarpController() {}
+ NullMouseWarpController(const NullMouseWarpController&) = delete;
+ NullMouseWarpController& operator=(const NullMouseWarpController&) = delete;
+
// MouseWarpController:
bool WarpMouseCursor(ui::MouseEvent* event) override;
void SetEnabled(bool enable) override;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(NullMouseWarpController);
};
} // namespace ash
diff --git a/ash/display/resolution_notification_controller.cc b/ash/display/resolution_notification_controller.cc
index af5be23..177e389 100644
--- a/ash/display/resolution_notification_controller.cc
+++ b/ash/display/resolution_notification_controller.cc
@@ -29,6 +29,10 @@
const display::ManagedDisplayMode& old_resolution,
const display::ManagedDisplayMode& new_resolution,
base::OnceClosure accept_callback);
+
+ ResolutionChangeInfo(const ResolutionChangeInfo&) = delete;
+ ResolutionChangeInfo& operator=(const ResolutionChangeInfo&) = delete;
+
~ResolutionChangeInfo();
// The id of the display where the resolution change happens.
@@ -46,9 +50,6 @@
// The callback when accept is chosen.
base::OnceClosure accept_callback;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ResolutionChangeInfo);
};
ResolutionNotificationController::ResolutionChangeInfo::ResolutionChangeInfo(
diff --git a/ash/display/root_window_transformers.cc b/ash/display/root_window_transformers.cc
index 3e5fe4fc..5842a978 100644
--- a/ash/display/root_window_transformers.cc
+++ b/ash/display/root_window_transformers.cc
@@ -123,6 +123,9 @@
initial_host_size_ = info.bounds_in_native().size();
}
+ AshRootWindowTransformer(const AshRootWindowTransformer&) = delete;
+ AshRootWindowTransformer& operator=(const AshRootWindowTransformer&) = delete;
+
// aura::RootWindowTransformer overrides:
gfx::Transform GetTransform() const override { return transform_; }
gfx::Transform GetInverseTransform() const override {
@@ -186,8 +189,6 @@
gfx::Transform insets_and_scale_transform_;
gfx::Rect initial_root_bounds_;
gfx::Size initial_host_size_;
-
- DISALLOW_COPY_AND_ASSIGN(AshRootWindowTransformer);
};
// RootWindowTransformer for mirror root window. We simply copy the
@@ -265,6 +266,10 @@
}
}
+ MirrorRootWindowTransformer(const MirrorRootWindowTransformer&) = delete;
+ MirrorRootWindowTransformer& operator=(const MirrorRootWindowTransformer&) =
+ delete;
+
// aura::RootWindowTransformer overrides:
gfx::Transform GetTransform() const override { return transform_; }
gfx::Transform GetInverseTransform() const override {
@@ -286,8 +291,6 @@
gfx::Transform transform_;
gfx::Rect root_bounds_;
gfx::Insets insets_;
-
- DISALLOW_COPY_AND_ASSIGN(MirrorRootWindowTransformer);
};
class PartialBoundsRootWindowTransformer : public RootWindowTransformer {
@@ -326,6 +329,11 @@
-SkIntToScalar(display.bounds().y()));
}
+ PartialBoundsRootWindowTransformer(
+ const PartialBoundsRootWindowTransformer&) = delete;
+ PartialBoundsRootWindowTransformer& operator=(
+ const PartialBoundsRootWindowTransformer&) = delete;
+
// RootWindowTransformer:
gfx::Transform GetTransform() const override { return transform_; }
gfx::Transform GetInverseTransform() const override {
@@ -344,8 +352,6 @@
private:
gfx::Transform transform_;
gfx::Rect root_bounds_;
-
- DISALLOW_COPY_AND_ASSIGN(PartialBoundsRootWindowTransformer);
};
} // namespace
diff --git a/ash/display/screen_ash.cc b/ash/display/screen_ash.cc
index 0cb59f8..6400703 100644
--- a/ash/display/screen_ash.cc
+++ b/ash/display/screen_ash.cc
@@ -44,6 +44,9 @@
SetDisplayForNewWindows(primary_display_.id());
}
+ ScreenForShutdown(const ScreenForShutdown&) = delete;
+ ScreenForShutdown& operator=(const ScreenForShutdown&) = delete;
+
// display::Screen overrides:
gfx::Point GetCursorScreenPoint() override { return gfx::Point(); }
bool IsWindowUnderCursor(gfx::NativeWindow window) override { return false; }
@@ -85,8 +88,6 @@
private:
const std::vector<display::Display> display_list_;
const display::Display primary_display_;
-
- DISALLOW_COPY_AND_ASSIGN(ScreenForShutdown);
};
} // namespace
diff --git a/ash/display/screen_orientation_controller.h b/ash/display/screen_orientation_controller.h
index 9eab587..0d3883a 100644
--- a/ash/display/screen_orientation_controller.h
+++ b/ash/display/screen_orientation_controller.h
@@ -70,6 +70,11 @@
};
ScreenOrientationController();
+
+ ScreenOrientationController(const ScreenOrientationController&) = delete;
+ ScreenOrientationController& operator=(const ScreenOrientationController&) =
+ delete;
+
~ScreenOrientationController() override;
OrientationLockType natural_orientation() const {
@@ -283,8 +288,6 @@
// Register for DisplayObserver callbacks.
display::ScopedDisplayObserver display_observer_{this};
-
- DISALLOW_COPY_AND_ASSIGN(ScreenOrientationController);
};
} // namespace ash
diff --git a/ash/display/screen_orientation_controller_test_api.h b/ash/display/screen_orientation_controller_test_api.h
index 9856ca5..f2ffda8 100644
--- a/ash/display/screen_orientation_controller_test_api.h
+++ b/ash/display/screen_orientation_controller_test_api.h
@@ -19,6 +19,11 @@
explicit ScreenOrientationControllerTestApi(
ScreenOrientationController* controller);
+ ScreenOrientationControllerTestApi(
+ const ScreenOrientationControllerTestApi&) = delete;
+ ScreenOrientationControllerTestApi& operator=(
+ const ScreenOrientationControllerTestApi&) = delete;
+
void SetDisplayRotation(
display::Display::Rotation rotation,
display::Display::RotationSource source,
@@ -37,8 +42,6 @@
private:
ScreenOrientationController* controller_;
-
- DISALLOW_COPY_AND_ASSIGN(ScreenOrientationControllerTestApi);
};
} // namespace ash
diff --git a/ash/display/touch_calibrator_controller_unittest.cc b/ash/display/touch_calibrator_controller_unittest.cc
index d407569c..3fc6b30b 100644
--- a/ash/display/touch_calibrator_controller_unittest.cc
+++ b/ash/display/touch_calibrator_controller_unittest.cc
@@ -48,6 +48,10 @@
public:
TouchCalibratorControllerTest() = default;
+ TouchCalibratorControllerTest(const TouchCalibratorControllerTest&) = delete;
+ TouchCalibratorControllerTest& operator=(
+ const TouchCalibratorControllerTest&) = delete;
+
void TearDown() override {
// Reset all touch device and touch association.
display::test::TouchDeviceManagerTestApi(touch_device_manager())
@@ -183,9 +187,6 @@
->ConfigureTouchDevices(transforms);
return touchdevice;
}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(TouchCalibratorControllerTest);
};
TEST_F(TouchCalibratorControllerTest, StartCalibration) {
diff --git a/ash/display/window_tree_host_manager.cc b/ash/display/window_tree_host_manager.cc
index 63f0305..f6690bc 100644
--- a/ash/display/window_tree_host_manager.cc
+++ b/ash/display/window_tree_host_manager.cc
@@ -161,6 +161,9 @@
focused_(nullptr),
active_(nullptr) {}
+ FocusActivationStore(const FocusActivationStore&) = delete;
+ FocusActivationStore& operator=(const FocusActivationStore&) = delete;
+
void Store(bool clear_focus) {
if (!activation_client_) {
aura::Window* root = Shell::GetPrimaryRootWindow();
@@ -214,8 +217,6 @@
aura::WindowTracker tracker_;
aura::Window* focused_;
aura::Window* active_;
-
- DISALLOW_COPY_AND_ASSIGN(FocusActivationStore);
};
////////////////////////////////////////////////////////////////////////////////
diff --git a/ash/display/window_tree_host_manager_unittest.cc b/ash/display/window_tree_host_manager_unittest.cc
index 037d0cc..21efd6dc 100644
--- a/ash/display/window_tree_host_manager_unittest.cc
+++ b/ash/display/window_tree_host_manager_unittest.cc
@@ -347,11 +347,12 @@
public:
TestMouseWatcherListener() = default;
+ TestMouseWatcherListener(const TestMouseWatcherListener&) = delete;
+ TestMouseWatcherListener& operator=(const TestMouseWatcherListener&) = delete;
+
private:
// views::MouseWatcherListener:
void MouseMovedOutOfHost() override {}
-
- DISALLOW_COPY_AND_ASSIGN(TestMouseWatcherListener);
};
} // namespace
diff --git a/ash/drag_drop/drag_drop_controller_unittest.cc b/ash/drag_drop/drag_drop_controller_unittest.cc
index 13a19965..5e13f6e 100644
--- a/ash/drag_drop/drag_drop_controller_unittest.cc
+++ b/ash/drag_drop/drag_drop_controller_unittest.cc
@@ -66,6 +66,9 @@
public:
DragTestView() : views::View() { Reset(); }
+ DragTestView(const DragTestView&) = delete;
+ DragTestView& operator=(const DragTestView&) = delete;
+
void Reset() {
num_drag_enters_ = 0;
num_drag_exits_ = 0;
@@ -149,8 +152,6 @@
num_drops_++;
output_drag_op = DragOperation::kCopy;
}
-
- DISALLOW_COPY_AND_ASSIGN(DragTestView);
};
class CompletableLinearAnimation : public gfx::LinearAnimation {
@@ -160,16 +161,20 @@
gfx::AnimationDelegate* delegate)
: gfx::LinearAnimation(duration, frame_rate, delegate) {}
- void Complete() { Step(start_time() + duration()); }
+ CompletableLinearAnimation(const CompletableLinearAnimation&) = delete;
+ CompletableLinearAnimation& operator=(const CompletableLinearAnimation&) =
+ delete;
- private:
- DISALLOW_COPY_AND_ASSIGN(CompletableLinearAnimation);
+ void Complete() { Step(start_time() + duration()); }
};
class TestDragDropController : public DragDropController {
public:
TestDragDropController() : DragDropController() { Reset(); }
+ TestDragDropController(const TestDragDropController&) = delete;
+ TestDragDropController& operator=(const TestDragDropController&) = delete;
+
void Reset() {
drag_start_received_ = false;
num_drag_updates_ = 0;
@@ -224,9 +229,6 @@
bool drop_received_;
bool drag_canceled_;
std::u16string drag_string_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(TestDragDropController);
};
class MockObserver : public aura::client::DragDropClientObserver {
@@ -244,6 +246,9 @@
TestObserver() : state_(State::kNotInvoked) {}
+ TestObserver(const TestObserver&) = delete;
+ TestObserver& operator=(const TestObserver&) = delete;
+
State state() const { return state_; }
// aura::client::DragDropClientObserver
@@ -260,8 +265,6 @@
private:
State state_;
-
- DISALLOW_COPY_AND_ASSIGN(TestObserver);
};
class EventTargetTestDelegate : public aura::client::DragDropDelegate {
@@ -275,6 +278,10 @@
};
explicit EventTargetTestDelegate(aura::Window* window) : window_(window) {}
+
+ EventTargetTestDelegate(const EventTargetTestDelegate&) = delete;
+ EventTargetTestDelegate& operator=(const EventTargetTestDelegate&) = delete;
+
State state() const { return state_; }
// aura::client::DragDropDelegate:
@@ -325,8 +332,6 @@
aura::Window* const window_;
State state_{State::kNotInvoked};
-
- DISALLOW_COPY_AND_ASSIGN(EventTargetTestDelegate);
};
void AddViewToWidgetAndResize(views::Widget* widget, views::View* view) {
diff --git a/ash/fast_ink/laser/laser_pointer_view.cc b/ash/fast_ink/laser/laser_pointer_view.cc
index 8e5a6185..2c8b57a 100644
--- a/ash/fast_ink/laser/laser_pointer_view.cc
+++ b/ash/fast_ink/laser/laser_pointer_view.cc
@@ -146,14 +146,15 @@
path_points_.push_back(ordered_points[3]);
}
+ LaserSegment(const LaserSegment&) = delete;
+ LaserSegment& operator=(const LaserSegment&) = delete;
+
SkPath path() const { return path_; }
std::vector<gfx::PointF> path_points() const { return path_points_; }
private:
SkPath path_;
std::vector<gfx::PointF> path_points_;
-
- DISALLOW_COPY_AND_ASSIGN(LaserSegment);
};
// LaserPointerView
diff --git a/ash/focus_cycler_unittest.cc b/ash/focus_cycler_unittest.cc
index 241c0cc..eff9fec 100644
--- a/ash/focus_cycler_unittest.cc
+++ b/ash/focus_cycler_unittest.cc
@@ -60,6 +60,9 @@
public:
FocusCyclerTest() = default;
+ FocusCyclerTest(const FocusCyclerTest&) = delete;
+ FocusCyclerTest& operator=(const FocusCyclerTest&) = delete;
+
void SetUp() override {
AshTestBase::SetUp();
@@ -100,8 +103,6 @@
private:
std::unique_ptr<FocusCycler> focus_cycler_;
-
- DISALLOW_COPY_AND_ASSIGN(FocusCyclerTest);
};
TEST_F(FocusCyclerTest, CycleFocusBrowserOnly) {
diff --git a/ash/highlighter/highlighter_controller.h b/ash/highlighter/highlighter_controller.h
index 23bdff7..4a685aa 100644
--- a/ash/highlighter/highlighter_controller.h
+++ b/ash/highlighter/highlighter_controller.h
@@ -61,6 +61,10 @@
};
HighlighterController();
+
+ HighlighterController(const HighlighterController&) = delete;
+ HighlighterController& operator=(const HighlighterController&) = delete;
+
~HighlighterController() override;
HighlighterEnabledState enabled_state() { return enabled_state_; }
@@ -150,8 +154,6 @@
base::ObserverList<Observer>::Unchecked observers_;
base::WeakPtrFactory<HighlighterController> weak_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(HighlighterController);
};
} // namespace ash
diff --git a/ash/highlighter/highlighter_result_view.cc b/ash/highlighter/highlighter_result_view.cc
index e6edc4e..0dae855 100644
--- a/ash/highlighter/highlighter_result_view.cc
+++ b/ash/highlighter/highlighter_result_view.cc
@@ -59,6 +59,9 @@
public:
ResultLayer(const gfx::Rect& bounds);
+ ResultLayer(const ResultLayer&) = delete;
+ ResultLayer& operator=(const ResultLayer&) = delete;
+
private:
// ui::LayerDelegate:
void OnDeviceScaleFactorChanged(float old_device_scale_factor,
@@ -75,8 +78,6 @@
float y,
float width,
cc::PaintFlags& flags);
-
- DISALLOW_COPY_AND_ASSIGN(ResultLayer);
};
ResultLayer::ResultLayer(const gfx::Rect& box) {
diff --git a/ash/host/ash_window_tree_host_unified.cc b/ash/host/ash_window_tree_host_unified.cc
index 40369d2..e0c23b1 100644
--- a/ash/host/ash_window_tree_host_unified.cc
+++ b/ash/host/ash_window_tree_host_unified.cc
@@ -30,6 +30,9 @@
DCHECK(delegate);
}
+ UnifiedEventTargeter(const UnifiedEventTargeter&) = delete;
+ UnifiedEventTargeter& operator=(const UnifiedEventTargeter&) = delete;
+
ui::EventTarget* FindTargetForEvent(ui::EventTarget* root,
ui::Event* event) override {
if (root == src_root_ && !event->target()) {
@@ -57,8 +60,6 @@
aura::Window* src_root_;
aura::Window* dst_root_;
AshWindowTreeHostMirroringDelegate* delegate_; // Not owned.
-
- DISALLOW_COPY_AND_ASSIGN(UnifiedEventTargeter);
};
AshWindowTreeHostUnified::AshWindowTreeHostUnified(
diff --git a/ash/host/transformer_helper.cc b/ash/host/transformer_helper.cc
index 12080e5..adc6dcc8 100644
--- a/ash/host/transformer_helper.cc
+++ b/ash/host/transformer_helper.cc
@@ -33,6 +33,10 @@
const gfx::Transform& transform)
: root_window_(root_window), transform_(transform) {}
+ SimpleRootWindowTransformer(const SimpleRootWindowTransformer&) = delete;
+ SimpleRootWindowTransformer& operator=(const SimpleRootWindowTransformer&) =
+ delete;
+
// RootWindowTransformer overrides:
gfx::Transform GetTransform() const override { return transform_; }
@@ -62,8 +66,6 @@
const aura::Window* root_window_;
const gfx::Transform transform_;
-
- DISALLOW_COPY_AND_ASSIGN(SimpleRootWindowTransformer);
};
} // namespace
diff --git a/ash/ime/ime_controller_impl_unittest.cc b/ash/ime/ime_controller_impl_unittest.cc
index 43270e5..b7249be 100644
--- a/ash/ime/ime_controller_impl_unittest.cc
+++ b/ash/ime/ime_controller_impl_unittest.cc
@@ -74,6 +74,10 @@
public:
TestImeControllerObserver() = default;
+ TestImeControllerObserver(const TestImeControllerObserver&) = delete;
+ TestImeControllerObserver& operator=(const TestImeControllerObserver&) =
+ delete;
+
// IMEController::Observer:
void OnCapsLockChanged(bool enabled) override { ++caps_lock_count_; }
void OnKeyboardLayoutNameChanged(const std::string& layout_name) override {
@@ -87,8 +91,6 @@
private:
int caps_lock_count_ = 0;
std::string last_keyboard_layout_name_;
-
- DISALLOW_COPY_AND_ASSIGN(TestImeControllerObserver);
};
using ImeControllerImplTest = AshTestBase;
diff --git a/ash/keyboard/arc/arc_virtual_keyboard_container_layout_manager.h b/ash/keyboard/arc/arc_virtual_keyboard_container_layout_manager.h
index 5240f1a21..b3f6177 100644
--- a/ash/keyboard/arc/arc_virtual_keyboard_container_layout_manager.h
+++ b/ash/keyboard/arc/arc_virtual_keyboard_container_layout_manager.h
@@ -17,6 +17,11 @@
explicit ArcVirtualKeyboardContainerLayoutManager(
aura::Window* arc_ime_window_parent_container);
+ ArcVirtualKeyboardContainerLayoutManager(
+ const ArcVirtualKeyboardContainerLayoutManager&) = delete;
+ ArcVirtualKeyboardContainerLayoutManager& operator=(
+ const ArcVirtualKeyboardContainerLayoutManager&) = delete;
+
// aura::LayoutManager:
void OnWindowResized() override;
void OnWindowAddedToLayout(aura::Window* child) override;
@@ -29,8 +34,6 @@
private:
aura::Window* arc_ime_window_parent_container_;
-
- DISALLOW_COPY_AND_ASSIGN(ArcVirtualKeyboardContainerLayoutManager);
};
} // namespace ash
diff --git a/ash/keyboard/ui/keyboard_ui_controller.cc b/ash/keyboard/ui/keyboard_ui_controller.cc
index 1bee89c..1038389 100644
--- a/ash/keyboard/ui/keyboard_ui_controller.cc
+++ b/ash/keyboard/ui/keyboard_ui_controller.cc
@@ -146,6 +146,10 @@
explicit CallbackAnimationObserver(base::OnceClosure callback)
: callback_(std::move(callback)) {}
+ CallbackAnimationObserver(const CallbackAnimationObserver&) = delete;
+ CallbackAnimationObserver& operator=(const CallbackAnimationObserver&) =
+ delete;
+
private:
// ui::ImplicitAnimationObserver:
void OnImplicitAnimationsCompleted() override {
@@ -161,8 +165,6 @@
}
base::OnceClosure callback_;
-
- DISALLOW_COPY_AND_ASSIGN(CallbackAnimationObserver);
};
KeyboardUIController::KeyboardUIController()
diff --git a/ash/keyboard/ui/keyboard_ui_model.h b/ash/keyboard/ui/keyboard_ui_model.h
index e9ce0f9..0a2222dc 100644
--- a/ash/keyboard/ui/keyboard_ui_model.h
+++ b/ash/keyboard/ui/keyboard_ui_model.h
@@ -51,6 +51,9 @@
public:
KeyboardUIModel();
+ KeyboardUIModel(const KeyboardUIModel&) = delete;
+ KeyboardUIModel& operator=(const KeyboardUIModel&) = delete;
+
// Get the current state of the keyboard UI.
KeyboardUIState state() const { return state_; }
@@ -60,8 +63,6 @@
private:
// Current state of the keyboard UI.
KeyboardUIState state_ = KeyboardUIState::kInitial;
-
- DISALLOW_COPY_AND_ASSIGN(KeyboardUIModel);
};
} // namespace keyboard
diff --git a/ash/keyboard/ui/test/run_all_unittests.cc b/ash/keyboard/ui/test/run_all_unittests.cc
index 2b3a1706..62795b9 100644
--- a/ash/keyboard/ui/test/run_all_unittests.cc
+++ b/ash/keyboard/ui/test/run_all_unittests.cc
@@ -21,6 +21,9 @@
public:
KeyboardTestSuite(int argc, char** argv) : base::TestSuite(argc, argv) {}
+ KeyboardTestSuite(const KeyboardTestSuite&) = delete;
+ KeyboardTestSuite& operator=(const KeyboardTestSuite&) = delete;
+
protected:
void Initialize() override {
base::TestSuite::Initialize();
@@ -41,8 +44,6 @@
private:
std::unique_ptr<aura::Env> env_;
-
- DISALLOW_COPY_AND_ASSIGN(KeyboardTestSuite);
};
} // namespace
diff --git a/ash/keyboard/ui/test/test_keyboard_controller_observer.h b/ash/keyboard/ui/test/test_keyboard_controller_observer.h
index ace27cf..04ca6ce 100644
--- a/ash/keyboard/ui/test/test_keyboard_controller_observer.h
+++ b/ash/keyboard/ui/test/test_keyboard_controller_observer.h
@@ -13,6 +13,12 @@
// A KeyboardControllerObserver that counts occurrences of events for testing.
struct TestKeyboardControllerObserver : public ash::KeyboardControllerObserver {
TestKeyboardControllerObserver();
+
+ TestKeyboardControllerObserver(const TestKeyboardControllerObserver&) =
+ delete;
+ TestKeyboardControllerObserver& operator=(
+ const TestKeyboardControllerObserver&) = delete;
+
~TestKeyboardControllerObserver() override;
// KeyboardControllerObserver:
@@ -20,7 +26,6 @@
int enabled_count = 0;
int disabled_count = 0;
- DISALLOW_COPY_AND_ASSIGN(TestKeyboardControllerObserver);
};
} // namespace keyboard
diff --git a/ash/keyboard/ui/test/test_keyboard_ui_factory.h b/ash/keyboard/ui/test/test_keyboard_ui_factory.h
index 5cc1ffc..1976a0c 100644
--- a/ash/keyboard/ui/test/test_keyboard_ui_factory.h
+++ b/ash/keyboard/ui/test/test_keyboard_ui_factory.h
@@ -42,6 +42,10 @@
};
explicit TestKeyboardUIFactory(ui::InputMethod* input_method);
+
+ TestKeyboardUIFactory(const TestKeyboardUIFactory&) = delete;
+ TestKeyboardUIFactory& operator=(const TestKeyboardUIFactory&) = delete;
+
~TestKeyboardUIFactory() override;
// Overridden from KeyboardUIFactory:
@@ -49,8 +53,6 @@
private:
ui::InputMethod* input_method_;
-
- DISALLOW_COPY_AND_ASSIGN(TestKeyboardUIFactory);
};
} // namespace keyboard
diff --git a/ash/keyboard/virtual_keyboard_container_layout_manager.h b/ash/keyboard/virtual_keyboard_container_layout_manager.h
index 1b43017..16ecb721 100644
--- a/ash/keyboard/virtual_keyboard_container_layout_manager.h
+++ b/ash/keyboard/virtual_keyboard_container_layout_manager.h
@@ -17,6 +17,11 @@
explicit VirtualKeyboardContainerLayoutManager(
aura::Window* ime_window_parent_container);
+ VirtualKeyboardContainerLayoutManager(
+ const VirtualKeyboardContainerLayoutManager&) = delete;
+ VirtualKeyboardContainerLayoutManager& operator=(
+ const VirtualKeyboardContainerLayoutManager&) = delete;
+
// Overridden from aura::LayoutManager
void OnWindowResized() override;
void OnWindowAddedToLayout(aura::Window* child) override;
@@ -29,8 +34,6 @@
private:
aura::Window* ime_window_parent_container_;
-
- DISALLOW_COPY_AND_ASSIGN(VirtualKeyboardContainerLayoutManager);
};
} // namespace ash
diff --git a/ash/login/ui/lock_contents_view.h b/ash/login/ui/lock_contents_view.h
index 568f360..9d99a85 100644
--- a/ash/login/ui/lock_contents_view.h
+++ b/ash/login/ui/lock_contents_view.h
@@ -136,6 +136,10 @@
LockScreen::ScreenType screen_type,
LoginDataDispatcher* data_dispatcher,
std::unique_ptr<LoginDetachableBaseModel> detachable_base_model);
+
+ LockContentsView(const LockContentsView&) = delete;
+ LockContentsView& operator=(const LockContentsView&) = delete;
+
~LockContentsView() override;
void FocusNextUser();
@@ -537,8 +541,6 @@
BottomIndicatorState::kNone;
base::WeakPtrFactory<LockContentsView> weak_ptr_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(LockContentsView);
};
} // namespace ash
diff --git a/ash/login/ui/lock_screen.h b/ash/login/ui/lock_screen.h
index 754bce3..73cdf33 100644
--- a/ash/login/ui/lock_screen.h
+++ b/ash/login/ui/lock_screen.h
@@ -46,6 +46,9 @@
// The UI that this instance is displaying.
enum class ScreenType { kLogin, kLock };
+ LockScreen(const LockScreen&) = delete;
+ LockScreen& operator=(const LockScreen&) = delete;
+
// Fetch the global lock screen instance. |Show()| must have been called
// before this.
static LockScreen* Get();
@@ -114,8 +117,6 @@
ScopedSessionObserver session_observer_{this};
std::vector<base::OnceClosure> on_shown_callbacks_;
-
- DISALLOW_COPY_AND_ASSIGN(LockScreen);
};
} // namespace ash
diff --git a/ash/login/ui/login_auth_user_view.cc b/ash/login/ui/login_auth_user_view.cc
index cd4b8fb..3d82291 100644
--- a/ash/login/ui/login_auth_user_view.cc
+++ b/ash/login/ui/login_auth_user_view.cc
@@ -230,6 +230,9 @@
false /*can_use_pin*/);
}
+ FingerprintLabel(const FingerprintLabel&) = delete;
+ FingerprintLabel& operator=(const FingerprintLabel&) = delete;
+
void SetTextBasedOnAuthAttempt(bool success) {
SetText(l10n_util::GetStringUTF16(
success ? IDS_ASH_LOGIN_FINGERPRINT_UNLOCK_AUTH_SUCCESS
@@ -288,8 +291,6 @@
}
std::u16string accessible_name_;
-
- DISALLOW_COPY_AND_ASSIGN(FingerprintLabel);
};
// The content needed to render the disabled auth message view.
@@ -744,6 +745,9 @@
message_contents_->SetMultiLine(true);
}
+ DisabledAuthMessageView(const DisabledAuthMessageView&) = delete;
+ DisabledAuthMessageView& operator=(const DisabledAuthMessageView&) = delete;
+
~DisabledAuthMessageView() override = default;
// Set the parameters needed to render the message.
@@ -812,8 +816,6 @@
views::Label* message_contents_;
views::ImageView* message_icon_;
const gfx::VectorIcon* message_vector_icon_ = nullptr;
-
- DISALLOW_COPY_AND_ASSIGN(DisabledAuthMessageView);
};
// The message shown to user when TPM is locked.
diff --git a/ash/login/ui/login_auth_user_view.h b/ash/login/ui/login_auth_user_view.h
index 935b2372..7aff83f 100644
--- a/ash/login/ui/login_auth_user_view.h
+++ b/ash/login/ui/login_auth_user_view.h
@@ -132,6 +132,10 @@
};
LoginAuthUserView(const LoginUserInfo& user, const Callbacks& callbacks);
+
+ LoginAuthUserView(const LoginAuthUserView&) = delete;
+ LoginAuthUserView& operator=(const LoginAuthUserView&) = delete;
+
~LoginAuthUserView() override;
// Set the displayed set of auth methods. |auth_methods| contains or-ed
@@ -297,8 +301,6 @@
std::unique_ptr<UiState> previous_state_;
base::WeakPtrFactory<LoginAuthUserView> weak_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(LoginAuthUserView);
};
} // namespace ash
diff --git a/ash/login/ui/login_auth_user_view_unittest.cc b/ash/login/ui/login_auth_user_view_unittest.cc
index 44d02051b..a591d96 100644
--- a/ash/login/ui/login_auth_user_view_unittest.cc
+++ b/ash/login/ui/login_auth_user_view_unittest.cc
@@ -61,6 +61,10 @@
/*autosubmit_feature*/
public ::testing::WithParamInterface<bool> {
public:
+ LoginAuthUserViewUnittest(const LoginAuthUserViewUnittest&) = delete;
+ LoginAuthUserViewUnittest& operator=(const LoginAuthUserViewUnittest&) =
+ delete;
+
static std::string ParamInfoToString(
testing::TestParamInfo<LoginAuthUserViewUnittest::ParamType> info) {
return base::StrCat(
@@ -145,9 +149,6 @@
LoginUserInfo user_;
views::View* container_ = nullptr; // Owned by test widget view hierarchy.
LoginAuthUserView* view_ = nullptr; // Owned by test widget view hierarchy.
-
- private:
- DISALLOW_COPY_AND_ASSIGN(LoginAuthUserViewUnittest);
};
// Verifies showing the PIN keyboard makes the user view grow.
diff --git a/ash/login/ui/login_base_bubble_view_unittest.cc b/ash/login/ui/login_base_bubble_view_unittest.cc
index 111c314..b743bde 100644
--- a/ash/login/ui/login_base_bubble_view_unittest.cc
+++ b/ash/login/ui/login_base_bubble_view_unittest.cc
@@ -19,6 +19,10 @@
} // namespace
class LoginBaseBubbleViewTest : public LoginTestBase {
+ public:
+ LoginBaseBubbleViewTest(const LoginBaseBubbleViewTest&) = delete;
+ LoginBaseBubbleViewTest& operator=(const LoginBaseBubbleViewTest&) = delete;
+
protected:
LoginBaseBubbleViewTest() = default;
~LoginBaseBubbleViewTest() override = default;
@@ -49,9 +53,6 @@
LoginBaseBubbleView* bubble_;
views::View* container_;
views::View* anchor_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(LoginBaseBubbleViewTest);
};
TEST_F(LoginBaseBubbleViewTest, BasicProperties) {
diff --git a/ash/login/ui/login_big_user_view.h b/ash/login/ui/login_big_user_view.h
index 4d0bd33c..660d15e 100644
--- a/ash/login/ui/login_big_user_view.h
+++ b/ash/login/ui/login_big_user_view.h
@@ -39,6 +39,10 @@
const LoginUserInfo& user,
const LoginAuthUserView::Callbacks& auth_user_callbacks,
const LoginPublicAccountUserView::Callbacks& public_account_callbacks);
+
+ LoginBigUserView(const LoginBigUserView&) = delete;
+ LoginBigUserView& operator=(const LoginBigUserView&) = delete;
+
~LoginBigUserView() override;
// Base on the user type, call CreateAuthUser or CreatePublicAccount.
@@ -84,8 +88,6 @@
base::ScopedObservation<WallpaperController, WallpaperControllerObserver>
observation_{this};
-
- DISALLOW_COPY_AND_ASSIGN(LoginBigUserView);
};
} // namespace ash
diff --git a/ash/login/ui/login_expanded_public_account_view.h b/ash/login/ui/login_expanded_public_account_view.h
index c315278..f905b98 100644
--- a/ash/login/ui/login_expanded_public_account_view.h
+++ b/ash/login/ui/login_expanded_public_account_view.h
@@ -63,6 +63,12 @@
using >
explicit LoginExpandedPublicAccountView(
const OnPublicSessionViewDismissed& on_dismissed);
+
+ LoginExpandedPublicAccountView(const LoginExpandedPublicAccountView&) =
+ delete;
+ LoginExpandedPublicAccountView& operator=(
+ const LoginExpandedPublicAccountView&) = delete;
+
~LoginExpandedPublicAccountView() override;
static void RegisterLocalStatePrefs(PrefRegistrySimple* registry);
@@ -89,8 +95,6 @@
std::unique_ptr<ui::EventHandler> event_handler_;
base::WeakPtrFactory<LoginExpandedPublicAccountView> weak_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(LoginExpandedPublicAccountView);
};
} // namespace ash
diff --git a/ash/login/ui/login_expanded_public_account_view_unittest.cc b/ash/login/ui/login_expanded_public_account_view_unittest.cc
index 087bf04..5c52c56a 100644
--- a/ash/login/ui/login_expanded_public_account_view_unittest.cc
+++ b/ash/login/ui/login_expanded_public_account_view_unittest.cc
@@ -45,6 +45,12 @@
class LoginExpandedPublicAccountViewTest
: public LoginTestBase,
public ::testing::WithParamInterface<const char*> {
+ public:
+ LoginExpandedPublicAccountViewTest(
+ const LoginExpandedPublicAccountViewTest&) = delete;
+ LoginExpandedPublicAccountViewTest& operator=(
+ const LoginExpandedPublicAccountViewTest&) = delete;
+
protected:
LoginExpandedPublicAccountViewTest() = default;
~LoginExpandedPublicAccountViewTest() override = default;
@@ -121,9 +127,6 @@
views::View* container_ = nullptr;
LoginExpandedPublicAccountView* public_account_ = nullptr;
views::View* other_view_ = nullptr;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(LoginExpandedPublicAccountViewTest);
};
} // namespace
diff --git a/ash/login/ui/login_password_view.h b/ash/login/ui/login_password_view.h
index 32731b9..38ccf0b 100644
--- a/ash/login/ui/login_password_view.h
+++ b/ash/login/ui/login_password_view.h
@@ -86,6 +86,10 @@
// Must call |Init| after construction.
explicit LoginPasswordView(const LoginPalette& palette);
+
+ LoginPasswordView(const LoginPasswordView&) = delete;
+ LoginPasswordView& operator=(const LoginPasswordView&) = delete;
+
~LoginPasswordView() override;
// |on_submit| is called when the user hits enter or has pressed the submit
@@ -214,8 +218,6 @@
bool should_show_easy_unlock_ = false;
bool is_capslock_higlight_ = false;
-
- DISALLOW_COPY_AND_ASSIGN(LoginPasswordView);
};
} // namespace ash
diff --git a/ash/login/ui/login_password_view_test.cc b/ash/login/ui/login_password_view_test.cc
index 69820f9..0d2b1cf 100644
--- a/ash/login/ui/login_password_view_test.cc
+++ b/ash/login/ui/login_password_view_test.cc
@@ -34,6 +34,10 @@
base::TimeDelta::FromSeconds(4);
class LoginPasswordViewTest : public LoginTestBase {
+ public:
+ LoginPasswordViewTest(const LoginPasswordViewTest&) = delete;
+ LoginPasswordViewTest& operator=(const LoginPasswordViewTest&) = delete;
+
protected:
LoginPasswordViewTest() = default;
~LoginPasswordViewTest() override = default;
@@ -70,9 +74,6 @@
bool is_password_field_empty_ = true;
bool easy_unlock_icon_hovered_called_ = false;
bool easy_unlock_icon_tapped_called_ = false;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(LoginPasswordViewTest);
};
// For tests with the Smart Lock UI revamp feature enabled. Enables the flag
diff --git a/ash/login/ui/login_pin_view.h b/ash/login/ui/login_pin_view.h
index 5503a92..082a5bf 100644
--- a/ash/login/ui/login_pin_view.h
+++ b/ash/login/ui/login_pin_view.h
@@ -103,6 +103,9 @@
const OnPinBackspace& on_backspace,
const OnPinSubmit& on_submit = base::NullCallback());
+ LoginPinView(const LoginPinView&) = delete;
+ LoginPinView& operator=(const LoginPinView&) = delete;
+
~LoginPinView() override;
// Notify accessibility that location of rows and LoginPinView changed.
@@ -129,8 +132,6 @@
std::vector<NonAccessibleView*> rows_;
std::vector<DigitPinButton*> digit_buttons_;
-
- DISALLOW_COPY_AND_ASSIGN(LoginPinView);
};
} // namespace ash
diff --git a/ash/login/ui/login_pin_view_unittest.cc b/ash/login/ui/login_pin_view_unittest.cc
index 53e02aa..855c605 100644
--- a/ash/login/ui/login_pin_view_unittest.cc
+++ b/ash/login/ui/login_pin_view_unittest.cc
@@ -21,6 +21,10 @@
namespace {
class LoginPinViewTest : public LoginTestBase {
+ public:
+ LoginPinViewTest(const LoginPinViewTest&) = delete;
+ LoginPinViewTest& operator=(const LoginPinViewTest&) = delete;
+
protected:
LoginPinViewTest() = default;
~LoginPinViewTest() override = default;
@@ -51,9 +55,6 @@
int backspace_ = 0;
// Number of times the submit event has been fired.
int submit_ = 0;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(LoginPinViewTest);
};
} // namespace
diff --git a/ash/login/ui/login_public_account_user_view.h b/ash/login/ui/login_public_account_user_view.h
index 1b6ea1f..d2b662a 100644
--- a/ash/login/ui/login_public_account_user_view.h
+++ b/ash/login/ui/login_public_account_user_view.h
@@ -46,6 +46,11 @@
LoginPublicAccountUserView(const LoginUserInfo& user,
const Callbacks& callbacks);
+
+ LoginPublicAccountUserView(const LoginPublicAccountUserView&) = delete;
+ LoginPublicAccountUserView& operator=(const LoginPublicAccountUserView&) =
+ delete;
+
~LoginPublicAccountUserView() override;
void SetAuthEnabled(bool enabled, bool animate);
@@ -80,8 +85,6 @@
bool ignore_hover_ = false;
bool auth_enabled_ = false;
LoginUserView* user_view_ = nullptr;
-
- DISALLOW_COPY_AND_ASSIGN(LoginPublicAccountUserView);
};
} // namespace ash
diff --git a/ash/login/ui/login_public_account_user_view_unittest.cc b/ash/login/ui/login_public_account_user_view_unittest.cc
index 0e12dab5..b3501e7a 100644
--- a/ash/login/ui/login_public_account_user_view_unittest.cc
+++ b/ash/login/ui/login_public_account_user_view_unittest.cc
@@ -20,6 +20,12 @@
constexpr int kNonEmptySize = 20;
class LoginPublicAccountUserViewTest : public LoginTestBase {
+ public:
+ LoginPublicAccountUserViewTest(const LoginPublicAccountUserViewTest&) =
+ delete;
+ LoginPublicAccountUserViewTest& operator=(
+ const LoginPublicAccountUserViewTest&) = delete;
+
protected:
LoginPublicAccountUserViewTest() = default;
~LoginPublicAccountUserViewTest() override = default;
@@ -73,8 +79,6 @@
}
void OnPublicAccountTapped() { ++public_account_tap_count_; }
-
- DISALLOW_COPY_AND_ASSIGN(LoginPublicAccountUserViewTest);
};
} // namespace
diff --git a/ash/login/ui/login_user_view.cc b/ash/login/ui/login_user_view.cc
index 75c94e1..ea965a4 100644
--- a/ash/login/ui/login_user_view.cc
+++ b/ash/login/ui/login_user_view.cc
@@ -185,6 +185,9 @@
AddChildView(enterprise_icon_);
}
+ UserImage(const UserImage&) = delete;
+ UserImage& operator=(const UserImage&) = delete;
+
~UserImage() override = default;
void UpdateForUser(const LoginUserInfo& user) {
@@ -258,8 +261,6 @@
bool animation_enabled_ = false;
base::WeakPtrFactory<UserImage> weak_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(UserImage);
};
// Shows the user's name.
diff --git a/ash/login/ui/login_user_view.h b/ash/login/ui/login_user_view.h
index 12e5187..7ba2618 100644
--- a/ash/login/ui/login_user_view.h
+++ b/ash/login/ui/login_user_view.h
@@ -63,6 +63,10 @@
const OnTap& on_tap,
const OnRemoveWarningShown& on_remove_warning_shown,
const OnRemove& on_remove);
+
+ LoginUserView(const LoginUserView&) = delete;
+ LoginUserView& operator=(const LoginUserView&) = delete;
+
~LoginUserView() override;
// Update the user view to display the given user information.
@@ -141,8 +145,6 @@
base::ScopedObservation<display::DisplayConfigurator,
display::DisplayConfigurator::Observer>
display_observation_{this};
-
- DISALLOW_COPY_AND_ASSIGN(LoginUserView);
};
} // namespace ash
diff --git a/ash/login/ui/login_user_view_unittest.cc b/ash/login/ui/login_user_view_unittest.cc
index 2721e3fde..69d2376 100644
--- a/ash/login/ui/login_user_view_unittest.cc
+++ b/ash/login/ui/login_user_view_unittest.cc
@@ -18,6 +18,10 @@
namespace {
class LoginUserViewUnittest : public LoginTestBase {
+ public:
+ LoginUserViewUnittest(const LoginUserViewUnittest&) = delete;
+ LoginUserViewUnittest& operator=(const LoginUserViewUnittest&) = delete;
+
protected:
LoginUserViewUnittest() = default;
~LoginUserViewUnittest() override = default;
@@ -75,8 +79,6 @@
void OnTapped() { ++tap_count_; }
void OnRemoveWarningShown() { ++remove_show_warning_count_; }
void OnRemove() { ++remove_count_; }
-
- DISALLOW_COPY_AND_ASSIGN(LoginUserViewUnittest);
};
} // namespace
diff --git a/ash/login/ui/note_action_launch_button.h b/ash/login/ui/note_action_launch_button.h
index 6558701a..3fc3563 100644
--- a/ash/login/ui/note_action_launch_button.h
+++ b/ash/login/ui/note_action_launch_button.h
@@ -50,6 +50,10 @@
explicit NoteActionLaunchButton(
mojom::TrayActionState initial_note_action_state);
+
+ NoteActionLaunchButton(const NoteActionLaunchButton&) = delete;
+ NoteActionLaunchButton& operator=(const NoteActionLaunchButton&) = delete;
+
~NoteActionLaunchButton() override;
// Updates the bubble visibility depending on the note taking action state.
@@ -64,8 +68,6 @@
// The actionable image button view.
ActionButton* action_button_ = nullptr;
-
- DISALLOW_COPY_AND_ASSIGN(NoteActionLaunchButton);
};
} // namespace ash
diff --git a/ash/login/ui/pin_request_view.h b/ash/login/ui/pin_request_view.h
index 5336615..6bfa9a1 100644
--- a/ash/login/ui/pin_request_view.h
+++ b/ash/login/ui/pin_request_view.h
@@ -121,6 +121,10 @@
// Creates pin request view that will enable the user to enter a pin.
// |request| is used to configure callbacks and UI details.
PinRequestView(PinRequest request, Delegate* delegate);
+
+ PinRequestView(const PinRequestView&) = delete;
+ PinRequestView& operator=(const PinRequestView&) = delete;
+
~PinRequestView() override;
// views::View:
@@ -207,8 +211,6 @@
tablet_mode_observation_{this};
base::WeakPtrFactory<PinRequestView> weak_ptr_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(PinRequestView);
};
} // namespace ash
diff --git a/ash/login/ui/pin_request_view_unittest.cc b/ash/login/ui/pin_request_view_unittest.cc
index 8b37cb4..d65bc54 100644
--- a/ash/login/ui/pin_request_view_unittest.cc
+++ b/ash/login/ui/pin_request_view_unittest.cc
@@ -49,6 +49,10 @@
class PinRequestViewTest : public LoginTestBase,
public PinRequestView::Delegate {
+ public:
+ PinRequestViewTest(const PinRequestViewTest&) = delete;
+ PinRequestViewTest& operator=(const PinRequestViewTest&) = delete;
+
protected:
PinRequestViewTest() {}
~PinRequestViewTest() override = default;
@@ -174,9 +178,6 @@
bool will_authenticate_ = true;
PinRequestView* view_ = nullptr; // Owned by test widget view hierarchy.
-
- private:
- DISALLOW_COPY_AND_ASSIGN(PinRequestViewTest);
};
// Tests that back button works.
diff --git a/ash/login/ui/pin_request_widget.h b/ash/login/ui/pin_request_widget.h
index b721ac8..5205cbf 100644
--- a/ash/login/ui/pin_request_widget.h
+++ b/ash/login/ui/pin_request_widget.h
@@ -45,6 +45,9 @@
PinRequestWidget* const pin_request_widget_;
};
+ PinRequestWidget(const PinRequestWidget&) = delete;
+ PinRequestWidget& operator=(const PinRequestWidget&) = delete;
+
// Creates and shows the instance of PinRequestWidget.
// This widget is modal and only one instance can be created at a time. It
// will be destroyed when dismissed.
@@ -89,8 +92,6 @@
std::unique_ptr<WindowDimmer> dimmer_;
base::WeakPtrFactory<PinRequestWidget> weak_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(PinRequestWidget);
};
} // namespace ash
diff --git a/ash/login/ui/scrollable_users_list_view.h b/ash/login/ui/scrollable_users_list_view.h
index 556c050c..a917d3b 100644
--- a/ash/login/ui/scrollable_users_list_view.h
+++ b/ash/login/ui/scrollable_users_list_view.h
@@ -50,6 +50,10 @@
ScrollableUsersListView(const std::vector<LoginUserInfo>& users,
const ActionWithUser& on_tap_user,
LoginDisplayStyle display_style);
+
+ ScrollableUsersListView(const ScrollableUsersListView&) = delete;
+ ScrollableUsersListView& operator=(const ScrollableUsersListView&) = delete;
+
~ScrollableUsersListView() override;
// Returns user view at |index| if it exists or nullptr otherwise.
@@ -103,8 +107,6 @@
base::ScopedObservation<WallpaperController, WallpaperControllerObserver>
observation_{this};
-
- DISALLOW_COPY_AND_ASSIGN(ScrollableUsersListView);
};
} // namespace ash
diff --git a/ash/login/ui/views_utils_unittest.cc b/ash/login/ui/views_utils_unittest.cc
index b6fbe76..d691ad54 100644
--- a/ash/login/ui/views_utils_unittest.cc
+++ b/ash/login/ui/views_utils_unittest.cc
@@ -13,12 +13,13 @@
namespace {
class ViewsUtilsUnittest : public testing::Test {
+ public:
+ ViewsUtilsUnittest(const ViewsUtilsUnittest&) = delete;
+ ViewsUtilsUnittest& operator=(const ViewsUtilsUnittest&) = delete;
+
protected:
ViewsUtilsUnittest() = default;
~ViewsUtilsUnittest() override = default;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ViewsUtilsUnittest);
};
} // namespace
diff --git a/ash/metrics/demo_session_metrics_recorder.cc b/ash/metrics/demo_session_metrics_recorder.cc
index 03d4f35..1111ac3 100644
--- a/ash/metrics/demo_session_metrics_recorder.cc
+++ b/ash/metrics/demo_session_metrics_recorder.cc
@@ -230,6 +230,11 @@
DemoSessionMetricsRecorder* metrics_recorder)
: metrics_recorder_(metrics_recorder) {}
+ ActiveAppArcPackageNameObserver(const ActiveAppArcPackageNameObserver&) =
+ delete;
+ ActiveAppArcPackageNameObserver& operator=(
+ const ActiveAppArcPackageNameObserver&) = delete;
+
// aura::WindowObserver
void OnWindowPropertyChanged(aura::Window* window,
const void* key,
@@ -262,8 +267,6 @@
DemoSessionMetricsRecorder* metrics_recorder_;
base::ScopedMultiSourceObservation<aura::Window, aura::WindowObserver>
scoped_observations_{this};
-
- DISALLOW_COPY_AND_ASSIGN(ActiveAppArcPackageNameObserver);
};
// Observes changes in a window's ArcPackageName property for the purpose of
@@ -275,6 +278,11 @@
DemoSessionMetricsRecorder* metrics_recorder)
: metrics_recorder_(metrics_recorder) {}
+ UniqueAppsLaunchedArcPackageNameObserver(
+ const UniqueAppsLaunchedArcPackageNameObserver&) = delete;
+ UniqueAppsLaunchedArcPackageNameObserver& operator=(
+ const UniqueAppsLaunchedArcPackageNameObserver&) = delete;
+
// aura::WindowObserver
void OnWindowPropertyChanged(aura::Window* window,
const void* key,
@@ -307,8 +315,6 @@
DemoSessionMetricsRecorder* metrics_recorder_;
base::ScopedObservation<aura::Window, aura::WindowObserver>
scoped_observation_{this};
-
- DISALLOW_COPY_AND_ASSIGN(UniqueAppsLaunchedArcPackageNameObserver);
};
DemoSessionMetricsRecorder::DemoSessionMetricsRecorder(
diff --git a/ash/metrics/desktop_task_switch_metric_recorder_unittest.cc b/ash/metrics/desktop_task_switch_metric_recorder_unittest.cc
index 154bb51..a2fec26 100644
--- a/ash/metrics/desktop_task_switch_metric_recorder_unittest.cc
+++ b/ash/metrics/desktop_task_switch_metric_recorder_unittest.cc
@@ -254,6 +254,12 @@
: public AshTestBase {
public:
DesktopTaskSwitchMetricRecorderWithShellIntegrationTest();
+
+ DesktopTaskSwitchMetricRecorderWithShellIntegrationTest(
+ const DesktopTaskSwitchMetricRecorderWithShellIntegrationTest&) = delete;
+ DesktopTaskSwitchMetricRecorderWithShellIntegrationTest& operator=(
+ const DesktopTaskSwitchMetricRecorderWithShellIntegrationTest&) = delete;
+
~DesktopTaskSwitchMetricRecorderWithShellIntegrationTest() override;
// AshTestBase:
@@ -276,10 +282,6 @@
// Delegate used when creating new windows using the
// CreatePositionableWindowInShellWithBounds(...) method.
aura::test::TestWindowDelegate test_window_delegate_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(
- DesktopTaskSwitchMetricRecorderWithShellIntegrationTest);
};
DesktopTaskSwitchMetricRecorderWithShellIntegrationTest::
diff --git a/ash/multi_device_setup/multi_device_notification_presenter_unittest.cc b/ash/multi_device_setup/multi_device_notification_presenter_unittest.cc
index 0aba2ab..5f32f79 100644
--- a/ash/multi_device_setup/multi_device_notification_presenter_unittest.cc
+++ b/ash/multi_device_setup/multi_device_notification_presenter_unittest.cc
@@ -104,6 +104,11 @@
public:
MultiDeviceNotificationPresenterTest() = default;
+ MultiDeviceNotificationPresenterTest(
+ const MultiDeviceNotificationPresenterTest&) = delete;
+ MultiDeviceNotificationPresenterTest& operator=(
+ const MultiDeviceNotificationPresenterTest&) = delete;
+
void SetUp() override {
fake_multidevice_setup_ =
std::make_unique<chromeos::multidevice_setup::FakeMultiDeviceSetup>();
@@ -334,8 +339,6 @@
EXPECT_EQ(title, kVisibleNotification->title());
EXPECT_EQ(message, kVisibleNotification->message());
}
-
- DISALLOW_COPY_AND_ASSIGN(MultiDeviceNotificationPresenterTest);
};
TEST_F(MultiDeviceNotificationPresenterTest, NotSignedIntoAccount) {
diff --git a/ash/multi_profile_uma.h b/ash/multi_profile_uma.h
index ad4be7b..2caa7ba 100644
--- a/ash/multi_profile_uma.h
+++ b/ash/multi_profile_uma.h
@@ -22,11 +22,12 @@
NUM_SWITCH_ACTIVE_USER_ACTIONS
};
+ MultiProfileUMA() = delete;
+ MultiProfileUMA(const MultiProfileUMA&) = delete;
+ MultiProfileUMA& operator=(const MultiProfileUMA&) = delete;
+
// Record switching the active user and what UI path was taken.
static void RecordSwitchActiveUser(SwitchActiveUserAction action);
-
- private:
- DISALLOW_IMPLICIT_CONSTRUCTORS(MultiProfileUMA);
};
} // namespace ash
diff --git a/ash/multi_user/user_switch_animator.cc b/ash/multi_user/user_switch_animator.cc
index e6108d6..2d629d3 100644
--- a/ash/multi_user/user_switch_animator.cc
+++ b/ash/multi_user/user_switch_animator.cc
@@ -59,13 +59,16 @@
std::unique_ptr<ui::LayerTreeOwner> old_layer)
: old_layer_(std::move(old_layer)) {}
+ MaximizedWindowAnimationWatcher(const MaximizedWindowAnimationWatcher&) =
+ delete;
+ MaximizedWindowAnimationWatcher& operator=(
+ const MaximizedWindowAnimationWatcher&) = delete;
+
// ui::ImplicitAnimationObserver:
void OnImplicitAnimationsCompleted() override { delete this; }
private:
std::unique_ptr<ui::LayerTreeOwner> old_layer_;
-
- DISALLOW_COPY_AND_ASSIGN(MaximizedWindowAnimationWatcher);
};
// Modifies the given |window_list| such that the most-recently used window (if
diff --git a/ash/policy/policy_recommendation_restorer_unittest.cc b/ash/policy/policy_recommendation_restorer_unittest.cc
index d57c0bc3..06b7bb9b 100644
--- a/ash/policy/policy_recommendation_restorer_unittest.cc
+++ b/ash/policy/policy_recommendation_restorer_unittest.cc
@@ -20,6 +20,12 @@
namespace ash {
class PolicyRecommendationRestorerTest : public NoSessionAshTestBase {
+ public:
+ PolicyRecommendationRestorerTest(const PolicyRecommendationRestorerTest&) =
+ delete;
+ PolicyRecommendationRestorerTest& operator=(
+ const PolicyRecommendationRestorerTest&) = delete;
+
protected:
PolicyRecommendationRestorerTest()
: recommended_prefs_(new TestingPrefStore),
@@ -146,9 +152,6 @@
// Ownerships are passed to SessionController.
TestingPrefStore* recommended_prefs_;
sync_preferences::TestingPrefServiceSyncable* prefs_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(PolicyRecommendationRestorerTest);
};
// Verifies that when no recommended values have been set, |restorer_| does not
diff --git a/ash/public/cpp/accessibility_controller.h b/ash/public/cpp/accessibility_controller.h
index 7b147dd..c27ba75 100644
--- a/ash/public/cpp/accessibility_controller.h
+++ b/ash/public/cpp/accessibility_controller.h
@@ -32,6 +32,9 @@
public:
static AccessibilityController* Get();
+ AccessibilityController(const AccessibilityController&) = delete;
+ AccessibilityController& operator=(const AccessibilityController&) = delete;
+
// Sets the client interface.
virtual void SetClient(AccessibilityControllerClient* client) = 0;
@@ -182,9 +185,6 @@
protected:
AccessibilityController();
virtual ~AccessibilityController();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(AccessibilityController);
};
} // namespace ash
diff --git a/ash/public/cpp/accessibility_focus_ring_controller.h b/ash/public/cpp/accessibility_focus_ring_controller.h
index e609173..ec69e3f0 100644
--- a/ash/public/cpp/accessibility_focus_ring_controller.h
+++ b/ash/public/cpp/accessibility_focus_ring_controller.h
@@ -25,6 +25,11 @@
public:
static AccessibilityFocusRingController* Get();
+ AccessibilityFocusRingController(const AccessibilityFocusRingController&) =
+ delete;
+ AccessibilityFocusRingController& operator=(
+ const AccessibilityFocusRingController&) = delete;
+
// Sets the focus ring with the given ID to the specifications of focus_ring.
virtual void SetFocusRing(
const std::string& focus_ring_id,
@@ -49,9 +54,6 @@
protected:
AccessibilityFocusRingController();
virtual ~AccessibilityFocusRingController();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(AccessibilityFocusRingController);
};
} // namespace ash
diff --git a/ash/public/cpp/accessibility_focus_ring_info.h b/ash/public/cpp/accessibility_focus_ring_info.h
index b7015c3..4f925a4 100644
--- a/ash/public/cpp/accessibility_focus_ring_info.h
+++ b/ash/public/cpp/accessibility_focus_ring_info.h
@@ -41,6 +41,11 @@
// TODO: This struct could possibly be merged with ash::AccessibilityFocusRing.
struct ASH_PUBLIC_EXPORT AccessibilityFocusRingInfo {
AccessibilityFocusRingInfo();
+
+ AccessibilityFocusRingInfo(const AccessibilityFocusRingInfo&) = delete;
+ AccessibilityFocusRingInfo& operator=(const AccessibilityFocusRingInfo&) =
+ delete;
+
~AccessibilityFocusRingInfo();
bool operator==(const AccessibilityFocusRingInfo& other) const;
@@ -53,9 +58,6 @@
SkColor color = SK_ColorTRANSPARENT;
SkColor secondary_color = SK_ColorTRANSPARENT;
SkColor background_color = SK_ColorTRANSPARENT;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(AccessibilityFocusRingInfo);
};
} // namespace ash
diff --git a/ash/public/cpp/android_intent_helper.h b/ash/public/cpp/android_intent_helper.h
index 98418483..2fe973d5 100644
--- a/ash/public/cpp/android_intent_helper.h
+++ b/ash/public/cpp/android_intent_helper.h
@@ -19,6 +19,9 @@
public:
static AndroidIntentHelper* GetInstance();
+ AndroidIntentHelper(const AndroidIntentHelper&) = delete;
+ AndroidIntentHelper& operator=(const AndroidIntentHelper&) = delete;
+
// Launch the given Android |intent|.
virtual void LaunchAndroidIntent(const std::string& intent) = 0;
@@ -30,9 +33,6 @@
protected:
AndroidIntentHelper();
virtual ~AndroidIntentHelper();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(AndroidIntentHelper);
};
ASH_PUBLIC_EXPORT bool IsAndroidIntent(const GURL& url);
diff --git a/ash/public/cpp/app_list/app_list_config_provider.h b/ash/public/cpp/app_list/app_list_config_provider.h
index c8ca592..278872a 100644
--- a/ash/public/cpp/app_list/app_list_config_provider.h
+++ b/ash/public/cpp/app_list/app_list_config_provider.h
@@ -41,6 +41,10 @@
static AppListConfigProvider& Get();
AppListConfigProvider();
+
+ AppListConfigProvider(const AppListConfigProvider&) = delete;
+ AppListConfigProvider& operator=(const AppListConfigProvider&) = delete;
+
~AppListConfigProvider();
void AddObserver(Observer* observer);
@@ -80,8 +84,6 @@
std::map<AppListConfigType, std::unique_ptr<AppListConfig>> configs_;
base::ObserverList<Observer> observers_;
-
- DISALLOW_COPY_AND_ASSIGN(AppListConfigProvider);
};
} // namespace ash
diff --git a/ash/public/cpp/assistant/assistant_setup.h b/ash/public/cpp/assistant/assistant_setup.h
index f7b556f3..e60ced0 100644
--- a/ash/public/cpp/assistant/assistant_setup.h
+++ b/ash/public/cpp/assistant/assistant_setup.h
@@ -25,6 +25,9 @@
public:
static AssistantSetup* GetInstance();
+ AssistantSetup(const AssistantSetup&) = delete;
+ AssistantSetup& operator=(const AssistantSetup&) = delete;
+
using StartAssistantOptInFlowCallback = base::OnceCallback<void(bool)>;
// Start the assistant setup flow.
@@ -40,9 +43,6 @@
protected:
AssistantSetup();
virtual ~AssistantSetup();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(AssistantSetup);
};
} // namespace ash
diff --git a/ash/public/cpp/assistant/controller/assistant_controller_observer.h b/ash/public/cpp/assistant/controller/assistant_controller_observer.h
index c4f9e08..423d6d9 100644
--- a/ash/public/cpp/assistant/controller/assistant_controller_observer.h
+++ b/ash/public/cpp/assistant/controller/assistant_controller_observer.h
@@ -27,6 +27,10 @@
class ASH_PUBLIC_EXPORT AssistantControllerObserver
: public base::CheckedObserver {
public:
+ AssistantControllerObserver(const AssistantControllerObserver&) = delete;
+ AssistantControllerObserver& operator=(const AssistantControllerObserver&) =
+ delete;
+
// Invoked when the AssistantController has been fully constructed.
virtual void OnAssistantControllerConstructed() {}
@@ -56,8 +60,6 @@
protected:
AssistantControllerObserver() = default;
~AssistantControllerObserver() override = default;
-
- DISALLOW_COPY_AND_ASSIGN(AssistantControllerObserver);
};
} // namespace ash
diff --git a/ash/public/cpp/external_arc/message_center/arc_notification_delegate.h b/ash/public/cpp/external_arc/message_center/arc_notification_delegate.h
index 42d0c37..60ea62cb 100644
--- a/ash/public/cpp/external_arc/message_center/arc_notification_delegate.h
+++ b/ash/public/cpp/external_arc/message_center/arc_notification_delegate.h
@@ -25,6 +25,9 @@
public:
explicit ArcNotificationDelegate(base::WeakPtr<ArcNotificationItem> item);
+ ArcNotificationDelegate(const ArcNotificationDelegate&) = delete;
+ ArcNotificationDelegate& operator=(const ArcNotificationDelegate&) = delete;
+
// Creates a view for the given notification (which must have been the one
// generated by |item_|).
std::unique_ptr<message_center::MessageView> CreateCustomMessageView(
@@ -44,8 +47,6 @@
// around ARC notification is somewhat complex so we want to use it until
// it gets stable.
base::WeakPtr<ArcNotificationItem> item_;
-
- DISALLOW_COPY_AND_ASSIGN(ArcNotificationDelegate);
};
} // namespace ash
diff --git a/ash/public/cpp/external_arc/message_center/arc_notification_manager.cc b/ash/public/cpp/external_arc/message_center/arc_notification_manager.cc
index 8187541..28245971 100644
--- a/ash/public/cpp/external_arc/message_center/arc_notification_manager.cc
+++ b/ash/public/cpp/external_arc/message_center/arc_notification_manager.cc
@@ -61,20 +61,26 @@
public:
explicit DoNotDisturbManager(ArcNotificationManager* manager)
: manager_(manager) {}
+
+ DoNotDisturbManager(const DoNotDisturbManager&) = delete;
+ DoNotDisturbManager& operator=(const DoNotDisturbManager&) = delete;
+
void OnQuietModeChanged(bool in_quiet_mode) override {
manager_->SetDoNotDisturbStatusOnAndroid(in_quiet_mode);
}
private:
ArcNotificationManager* const manager_;
-
- DISALLOW_COPY_AND_ASSIGN(DoNotDisturbManager);
};
class VisibilityManager : public message_center::MessageCenterObserver {
public:
explicit VisibilityManager(ArcNotificationManager* manager)
: manager_(manager) {}
+
+ VisibilityManager(const VisibilityManager&) = delete;
+ VisibilityManager& operator=(const VisibilityManager&) = delete;
+
void OnCenterVisibilityChanged(
message_center::Visibility visibility) override {
manager_->OnMessageCenterVisibilityChanged(toMojom(visibility));
@@ -92,8 +98,6 @@
}
ArcNotificationManager* const manager_;
-
- DISALLOW_COPY_AND_ASSIGN(VisibilityManager);
};
} // namespace
diff --git a/ash/public/cpp/external_arc/message_center/arc_notification_surface_manager.h b/ash/public/cpp/external_arc/message_center/arc_notification_surface_manager.h
index 11054f1..d182d66 100644
--- a/ash/public/cpp/external_arc/message_center/arc_notification_surface_manager.h
+++ b/ash/public/cpp/external_arc/message_center/arc_notification_surface_manager.h
@@ -31,6 +31,10 @@
};
static ArcNotificationSurfaceManager* Get();
+ ArcNotificationSurfaceManager(const ArcNotificationSurfaceManager&) = delete;
+ ArcNotificationSurfaceManager& operator=(
+ const ArcNotificationSurfaceManager&) = delete;
+
virtual ~ArcNotificationSurfaceManager();
virtual ArcNotificationSurface* GetArcSurface(
@@ -43,8 +47,6 @@
private:
static ArcNotificationSurfaceManager* instance_;
-
- DISALLOW_COPY_AND_ASSIGN(ArcNotificationSurfaceManager);
};
} // namespace ash
diff --git a/ash/public/cpp/external_arc/message_center/arc_notification_view_unittest.cc b/ash/public/cpp/external_arc/message_center/arc_notification_view_unittest.cc
index 1e134d8..d1893ed 100644
--- a/ash/public/cpp/external_arc/message_center/arc_notification_view_unittest.cc
+++ b/ash/public/cpp/external_arc/message_center/arc_notification_view_unittest.cc
@@ -46,14 +46,15 @@
public:
TestTextInputClient() : ui::DummyTextInputClient(ui::TEXT_INPUT_TYPE_TEXT) {}
+ TestTextInputClient(const TestTextInputClient&) = delete;
+ TestTextInputClient& operator=(const TestTextInputClient&) = delete;
+
ui::TextInputType GetTextInputType() const override { return type_; }
void set_text_input_type(ui::TextInputType type) { type_ = type; }
private:
ui::TextInputType type_ = ui::TEXT_INPUT_TYPE_NONE;
-
- DISALLOW_COPY_AND_ASSIGN(TestTextInputClient);
};
} // namespace
diff --git a/ash/public/cpp/login_screen_test_api.h b/ash/public/cpp/login_screen_test_api.h
index 0d09c1c1..2c61d19 100644
--- a/ash/public/cpp/login_screen_test_api.h
+++ b/ash/public/cpp/login_screen_test_api.h
@@ -20,6 +20,10 @@
class ASH_PUBLIC_EXPORT LoginScreenTestApi {
public:
+ LoginScreenTestApi() = delete;
+ LoginScreenTestApi(const LoginScreenTestApi&) = delete;
+ LoginScreenTestApi& operator=(const LoginScreenTestApi&) = delete;
+
static bool IsLockShown();
// Schedules the callback to be run when the LockScreen is shown. Note that
// the LockScreen class is used for both the Lock and the Login screens.
@@ -95,9 +99,6 @@
static std::u16string GetPinRequestWidgetTitle();
static void SubmitPinRequestWidget(const std::string& pin);
static void CancelPinRequestWidget();
-
- private:
- DISALLOW_IMPLICIT_CONSTRUCTORS(LoginScreenTestApi);
};
} // namespace ash
diff --git a/ash/public/cpp/night_light_controller.h b/ash/public/cpp/night_light_controller.h
index a5b49a3a..b559bd2 100644
--- a/ash/public/cpp/night_light_controller.h
+++ b/ash/public/cpp/night_light_controller.h
@@ -61,6 +61,9 @@
static NightLightController* GetInstance();
+ NightLightController(const NightLightController&) = delete;
+ NightLightController& operator=(const NightLightController&) = delete;
+
// Provides the NightLightController with the user's geoposition so that it
// can calculate the sunset and sunrise times. This should only be called when
// the schedule type is set to "Sunset to Sunrise".
@@ -77,9 +80,6 @@
virtual ~NightLightController();
base::ObserverList<Observer>::Unchecked observers_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(NightLightController);
};
} // namespace ash
diff --git a/ash/public/cpp/note_taking_client.h b/ash/public/cpp/note_taking_client.h
index ce22ba3..04f48961 100644
--- a/ash/public/cpp/note_taking_client.h
+++ b/ash/public/cpp/note_taking_client.h
@@ -16,6 +16,9 @@
public:
static NoteTakingClient* GetInstance();
+ NoteTakingClient(const NoteTakingClient&) = delete;
+ NoteTakingClient& operator=(const NoteTakingClient&) = delete;
+
// Returns true when it can create notes.
virtual bool CanCreateNote() = 0;
@@ -25,9 +28,6 @@
protected:
NoteTakingClient();
virtual ~NoteTakingClient();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(NoteTakingClient);
};
} // namespace ash
diff --git a/ash/public/cpp/notifier_settings_controller.h b/ash/public/cpp/notifier_settings_controller.h
index 541929c..e560f1a 100644
--- a/ash/public/cpp/notifier_settings_controller.h
+++ b/ash/public/cpp/notifier_settings_controller.h
@@ -23,6 +23,10 @@
// Returns the singleton instance.
static NotifierSettingsController* Get();
+ NotifierSettingsController(const NotifierSettingsController&) = delete;
+ NotifierSettingsController& operator=(const NotifierSettingsController&) =
+ delete;
+
// Assembles the list of active notifiers and updates all
// NotifierSettingsObservers via OnNotifiersUpdated.
virtual void GetNotifiers() = 0;
@@ -40,8 +44,6 @@
protected:
NotifierSettingsController();
virtual ~NotifierSettingsController();
-
- DISALLOW_COPY_AND_ASSIGN(NotifierSettingsController);
};
} // namespace ash
diff --git a/ash/public/cpp/presentation_time_recorder.h b/ash/public/cpp/presentation_time_recorder.h
index 6d23fb5..773049451 100644
--- a/ash/public/cpp/presentation_time_recorder.h
+++ b/ash/public/cpp/presentation_time_recorder.h
@@ -31,6 +31,9 @@
public:
explicit TestApi(PresentationTimeRecorder* recorder);
+ TestApi(const TestApi&) = delete;
+ TestApi& operator=(const TestApi&) = delete;
+
void OnCompositingDidCommit(ui::Compositor* compositor);
void OnPresented(int count,
base::TimeTicks requested_time,
@@ -42,11 +45,14 @@
private:
PresentationTimeRecorder* recorder_;
- DISALLOW_COPY_AND_ASSIGN(TestApi);
};
explicit PresentationTimeRecorder(
std::unique_ptr<PresentationTimeRecorderInternal> internal);
+
+ PresentationTimeRecorder(const PresentationTimeRecorder&) = delete;
+ PresentationTimeRecorder& operator=(const PresentationTimeRecorder&) = delete;
+
~PresentationTimeRecorder();
// Start recording next frame. It skips requesting next frame and returns
@@ -59,8 +65,6 @@
private:
std::unique_ptr<PresentationTimeRecorderInternal> recorder_internal_;
-
- DISALLOW_COPY_AND_ASSIGN(PresentationTimeRecorder);
};
// Creates a PresentationTimeRecorder that records timing histograms of
diff --git a/ash/public/cpp/shelf_model_unittest.cc b/ash/public/cpp/shelf_model_unittest.cc
index 17de111b..e5442c0e 100644
--- a/ash/public/cpp/shelf_model_unittest.cc
+++ b/ash/public/cpp/shelf_model_unittest.cc
@@ -22,6 +22,9 @@
public:
TestShelfModelObserver() = default;
+ TestShelfModelObserver(const TestShelfModelObserver&) = delete;
+ TestShelfModelObserver& operator=(const TestShelfModelObserver&) = delete;
+
// Returns a string description of the changes that have occurred since this
// was last invoked. Resets state to initial state.
std::string StateStringAndClear() {
@@ -61,8 +64,6 @@
int changed_count_ = 0;
int moved_count_ = 0;
int delegate_changed_count_ = 0;
-
- DISALLOW_COPY_AND_ASSIGN(TestShelfModelObserver);
};
} // namespace
diff --git a/ash/public/cpp/wallpaper/wallpaper_controller_observer.h b/ash/public/cpp/wallpaper/wallpaper_controller_observer.h
index 1ef400a..fdc5aca 100644
--- a/ash/public/cpp/wallpaper/wallpaper_controller_observer.h
+++ b/ash/public/cpp/wallpaper/wallpaper_controller_observer.h
@@ -15,6 +15,10 @@
public:
WallpaperControllerObserver();
+ WallpaperControllerObserver(const WallpaperControllerObserver&) = delete;
+ WallpaperControllerObserver& operator=(const WallpaperControllerObserver&) =
+ delete;
+
// Invoked when the wallpaper is about to change.
virtual void OnWallpaperChanging() {}
@@ -41,9 +45,6 @@
protected:
virtual ~WallpaperControllerObserver();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(WallpaperControllerObserver);
};
} // namespace ash
diff --git a/ash/root_window_controller_unittest.cc b/ash/root_window_controller_unittest.cc
index f2a5cbf..47f1604 100644
--- a/ash/root_window_controller_unittest.cc
+++ b/ash/root_window_controller_unittest.cc
@@ -735,6 +735,9 @@
public:
MockTextInputClient() : ui::DummyTextInputClient(ui::TEXT_INPUT_TYPE_TEXT) {}
+ MockTextInputClient(const MockTextInputClient&) = delete;
+ MockTextInputClient& operator=(const MockTextInputClient&) = delete;
+
void EnsureCaretNotInRect(const gfx::Rect& rect) override {
caret_exclude_rect_ = rect;
}
@@ -743,23 +746,22 @@
private:
gfx::Rect caret_exclude_rect_;
-
- DISALLOW_COPY_AND_ASSIGN(MockTextInputClient);
};
class TargetHitTestEventHandler : public ui::test::TestEventHandler {
public:
TargetHitTestEventHandler() = default;
+ TargetHitTestEventHandler(const TargetHitTestEventHandler&) = delete;
+ TargetHitTestEventHandler& operator=(const TargetHitTestEventHandler&) =
+ delete;
+
// ui::test::TestEventHandler overrides.
void OnMouseEvent(ui::MouseEvent* event) override {
if (event->type() == ui::ET_MOUSE_PRESSED)
ui::test::TestEventHandler::OnMouseEvent(event);
event->StopPropagation();
}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(TargetHitTestEventHandler);
};
// Test for http://crbug.com/263599. Virtual keyboard should be able to receive
diff --git a/ash/rotator/screen_rotation_animator_unittest.cc b/ash/rotator/screen_rotation_animator_unittest.cc
index 28443fa..14d4d9a 100644
--- a/ash/rotator/screen_rotation_animator_unittest.cc
+++ b/ash/rotator/screen_rotation_animator_unittest.cc
@@ -60,6 +60,9 @@
public:
AnimationObserver() = default;
+ AnimationObserver(const AnimationObserver&) = delete;
+ AnimationObserver& operator=(const AnimationObserver&) = delete;
+
bool copy_notified() const { return copy_notified_; }
bool finish_notified() const { return finish_notified_; }
@@ -72,8 +75,6 @@
private:
bool copy_notified_ = false;
bool finish_notified_ = false;
-
- DISALLOW_COPY_AND_ASSIGN(AnimationObserver);
};
class TestScreenRotationAnimator : public ScreenRotationAnimator {
diff --git a/ash/session/multiprofiles_intro_dialog.h b/ash/session/multiprofiles_intro_dialog.h
index bb5af9fc..427e23e 100644
--- a/ash/session/multiprofiles_intro_dialog.h
+++ b/ash/session/multiprofiles_intro_dialog.h
@@ -23,6 +23,9 @@
static void Show(OnAcceptCallback on_accept);
+ MultiprofilesIntroDialog(const MultiprofilesIntroDialog&) = delete;
+ MultiprofilesIntroDialog& operator=(const MultiprofilesIntroDialog&) = delete;
+
// views::View overrides.
gfx::Size CalculatePreferredSize() const override;
@@ -34,8 +37,6 @@
views::Checkbox* never_show_again_checkbox_;
OnAcceptCallback on_accept_;
-
- DISALLOW_COPY_AND_ASSIGN(MultiprofilesIntroDialog);
};
} // namespace ash
diff --git a/ash/session/session_aborted_dialog.h b/ash/session/session_aborted_dialog.h
index db74931..eddf0c52 100644
--- a/ash/session/session_aborted_dialog.h
+++ b/ash/session/session_aborted_dialog.h
@@ -18,6 +18,9 @@
public:
static void Show(const std::string& user_email);
+ SessionAbortedDialog(const SessionAbortedDialog&) = delete;
+ SessionAbortedDialog& operator=(const SessionAbortedDialog&) = delete;
+
// views::View overrides.
gfx::Size CalculatePreferredSize() const override;
@@ -26,8 +29,6 @@
~SessionAbortedDialog() override;
void InitDialog(const std::string& user_email);
-
- DISALLOW_COPY_AND_ASSIGN(SessionAbortedDialog);
};
} // namespace ash
diff --git a/ash/shelf/home_button.h b/ash/shelf/home_button.h
index 9ad36eb..11a9963 100644
--- a/ash/shelf/home_button.h
+++ b/ash/shelf/home_button.h
@@ -47,6 +47,10 @@
static const char kViewClassName[];
explicit HomeButton(Shelf* shelf);
+
+ HomeButton(const HomeButton&) = delete;
+ HomeButton& operator=(const HomeButton&) = delete;
+
~HomeButton() override;
// views::Button:
@@ -91,8 +95,6 @@
// The controller used to determine the button's behavior.
HomeButtonController controller_;
-
- DISALLOW_COPY_AND_ASSIGN(HomeButton);
};
} // namespace ash
diff --git a/ash/shelf/hotseat_widget.h b/ash/shelf/hotseat_widget.h
index 861f694..830202d 100644
--- a/ash/shelf/hotseat_widget.h
+++ b/ash/shelf/hotseat_widget.h
@@ -66,6 +66,10 @@
};
HotseatWidget();
+
+ HotseatWidget(const HotseatWidget&) = delete;
+ HotseatWidget& operator=(const HotseatWidget&) = delete;
+
~HotseatWidget() override;
// Returns whether the hotseat background should be shown.
@@ -257,8 +261,6 @@
// on the non visible portion of the hotseat, or events that reach the hotseat
// during an animation.
std::unique_ptr<aura::ScopedWindowTargeter> hotseat_window_targeter_;
-
- DISALLOW_COPY_AND_ASSIGN(HotseatWidget);
};
} // namespace ash
diff --git a/ash/shelf/login_shelf_view.cc b/ash/shelf/login_shelf_view.cc
index 9995ab2..ab40718 100644
--- a/ash/shelf/login_shelf_view.cc
+++ b/ash/shelf/login_shelf_view.cc
@@ -352,6 +352,9 @@
1, gfx::Font::FontStyle::NORMAL, gfx::Font::Weight::NORMAL));
}
+ KioskAppsButton(const KioskAppsButton&) = delete;
+ KioskAppsButton& operator=(const KioskAppsButton&) = delete;
+
bool LaunchAppForTesting(const std::string& app_id) {
for (size_t i = 0; i < kiosk_apps_.size(); ++i) {
if (kiosk_apps_[i].app_id == app_id) {
@@ -449,8 +452,6 @@
std::vector<KioskAppMenuEntry> kiosk_apps_;
bool is_launch_enabled_ = true;
-
- DISALLOW_COPY_AND_ASSIGN(KioskAppsButton);
};
// Class that temporarily disables Guest login buttin on shelf.
diff --git a/ash/shelf/shelf.h b/ash/shelf/shelf.h
index 92725f2..b119b5c 100644
--- a/ash/shelf/shelf.h
+++ b/ash/shelf/shelf.h
@@ -70,6 +70,10 @@
};
Shelf();
+
+ Shelf(const Shelf&) = delete;
+ Shelf& operator=(const Shelf&) = delete;
+
~Shelf() override;
// Returns the shelf for the display that |window| is on. Note that the shelf
@@ -322,8 +326,6 @@
int auto_hide_lock_ = 0;
std::unique_ptr<ShelfTooltipManager> tooltip_;
-
- DISALLOW_COPY_AND_ASSIGN(Shelf);
};
} // namespace ash
diff --git a/ash/shelf/shelf_app_button.cc b/ash/shelf/shelf_app_button.cc
index a7457091..0affda1 100644
--- a/ash/shelf/shelf_app_button.cc
+++ b/ash/shelf/shelf_app_button.cc
@@ -84,6 +84,9 @@
virtual ~Observer() = default;
};
+ ShelfAppButtonAnimation(const ShelfAppButtonAnimation&) = delete;
+ ShelfAppButtonAnimation& operator=(const ShelfAppButtonAnimation&) = delete;
+
static ShelfAppButtonAnimation* GetInstance() {
static ShelfAppButtonAnimation* s_instance = new ShelfAppButtonAnimation();
return s_instance;
@@ -136,8 +139,6 @@
gfx::ThrobAnimation animation_;
base::ObserverList<Observer>::Unchecked observers_;
-
- DISALLOW_COPY_AND_ASSIGN(ShelfAppButtonAnimation);
};
} // namespace
diff --git a/ash/shelf/shelf_button_pressed_metric_tracker_unittest.cc b/ash/shelf/shelf_button_pressed_metric_tracker_unittest.cc
index 4277797..e6ae884 100644
--- a/ash/shelf/shelf_button_pressed_metric_tracker_unittest.cc
+++ b/ash/shelf/shelf_button_pressed_metric_tracker_unittest.cc
@@ -26,8 +26,8 @@
public:
DummyButton();
- private:
- DISALLOW_COPY_AND_ASSIGN(DummyButton);
+ DummyButton(const DummyButton&) = delete;
+ DummyButton& operator=(const DummyButton&) = delete;
};
DummyButton::DummyButton() : views::Button(views::Button::PressedCallback()) {}
diff --git a/ash/shelf/shelf_layout_manager.h b/ash/shelf/shelf_layout_manager.h
index f2bcd53..469d058 100644
--- a/ash/shelf/shelf_layout_manager.h
+++ b/ash/shelf/shelf_layout_manager.h
@@ -114,6 +114,10 @@
};
ShelfLayoutManager(ShelfWidget* shelf_widget, Shelf* shelf);
+
+ ShelfLayoutManager(const ShelfLayoutManager&) = delete;
+ ShelfLayoutManager& operator=(const ShelfLayoutManager&) = delete;
+
~ShelfLayoutManager() override;
// Initializes observers.
@@ -730,8 +734,6 @@
std::unique_ptr<PresentationTimeRecorder> hotseat_presentation_time_recorder_;
base::WeakPtrFactory<ShelfLayoutManager> weak_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(ShelfLayoutManager);
};
} // namespace ash
diff --git a/ash/shelf/shelf_locking_manager_unittest.cc b/ash/shelf/shelf_locking_manager_unittest.cc
index cae59b6..63a07f7 100644
--- a/ash/shelf/shelf_locking_manager_unittest.cc
+++ b/ash/shelf/shelf_locking_manager_unittest.cc
@@ -15,6 +15,9 @@
public:
ShelfLockingManagerTest() = default;
+ ShelfLockingManagerTest(const ShelfLockingManagerTest&) = delete;
+ ShelfLockingManagerTest& operator=(const ShelfLockingManagerTest&) = delete;
+
ShelfLockingManager* GetShelfLockingManager() {
return GetPrimaryShelf()->GetShelfLockingManagerForTesting();
}
@@ -26,9 +29,6 @@
void SetSessionState(session_manager::SessionState state) {
GetShelfLockingManager()->OnSessionStateChanged(state);
}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ShelfLockingManagerTest);
};
// Makes sure shelf alignment is correct for lock screen.
diff --git a/ash/shelf/shelf_navigation_widget.h b/ash/shelf/shelf_navigation_widget.h
index 9b2ce490..1d610a6 100644
--- a/ash/shelf/shelf_navigation_widget.h
+++ b/ash/shelf/shelf_navigation_widget.h
@@ -52,6 +52,10 @@
};
ShelfNavigationWidget(Shelf* shelf, ShelfView* shelf_view);
+
+ ShelfNavigationWidget(const ShelfNavigationWidget&) = delete;
+ ShelfNavigationWidget& operator=(const ShelfNavigationWidget&) = delete;
+
~ShelfNavigationWidget() override;
// Initializes the widget, sets its contents view and basic properties.
@@ -139,8 +143,6 @@
// Widget to ensure it outlives the HomeButton view.
std::unique_ptr<NavigationButtonAnimationMetricsReporter>
home_button_metrics_reporter_;
-
- DISALLOW_COPY_AND_ASSIGN(ShelfNavigationWidget);
};
} // namespace ash
diff --git a/ash/shelf/shelf_test_util.h b/ash/shelf/shelf_test_util.h
index b9f9dca..a1e2898 100644
--- a/ash/shelf/shelf_test_util.h
+++ b/ash/shelf/shelf_test_util.h
@@ -18,6 +18,9 @@
class ShelfTestUtil {
public:
+ ShelfTestUtil(const ShelfTestUtil&) = delete;
+ ShelfTestUtil& operator=(const ShelfTestUtil&) = delete;
+
// Adds an application shortcut to the shelf model, with the given identifier
// and the given shelf item type.
static ShelfItem AddAppShortcut(const std::string& id, ShelfItemType type);
@@ -27,7 +30,6 @@
static ShelfItem AddAppShortcutWithIcon(const std::string& id,
ShelfItemType type,
gfx::ImageSkia icon);
- DISALLOW_COPY_AND_ASSIGN(ShelfTestUtil);
};
// Waits for an overview enter animation if |enter|; waits for an overview exit
diff --git a/ash/shelf/shelf_tooltip_bubble.h b/ash/shelf/shelf_tooltip_bubble.h
index f03d7ba..0d33a7d9 100644
--- a/ash/shelf/shelf_tooltip_bubble.h
+++ b/ash/shelf/shelf_tooltip_bubble.h
@@ -23,6 +23,9 @@
SkColor background_color,
const std::u16string& text);
+ ShelfTooltipBubble(const ShelfTooltipBubble&) = delete;
+ ShelfTooltipBubble& operator=(const ShelfTooltipBubble&) = delete;
+
protected:
// ShelfBubble:
bool ShouldCloseOnPressDown() override;
@@ -31,8 +34,6 @@
private:
// BubbleDialogDelegateView overrides:
gfx::Size CalculatePreferredSize() const override;
-
- DISALLOW_COPY_AND_ASSIGN(ShelfTooltipBubble);
};
} // namespace ash
diff --git a/ash/shelf/shelf_view_unittest.cc b/ash/shelf/shelf_view_unittest.cc
index 50471d1..77d4d298 100644
--- a/ash/shelf/shelf_view_unittest.cc
+++ b/ash/shelf/shelf_view_unittest.cc
@@ -2356,6 +2356,10 @@
public:
ShelfViewVisibleBoundsTest() : scoped_locale_(GetParam() ? "he" : "") {}
+ ShelfViewVisibleBoundsTest(const ShelfViewVisibleBoundsTest&) = delete;
+ ShelfViewVisibleBoundsTest& operator=(const ShelfViewVisibleBoundsTest&) =
+ delete;
+
void CheckAllItemsAreInBounds() {
gfx::Rect visible_bounds = shelf_view_->GetVisibleItemsBoundsInScreen();
gfx::Rect shelf_bounds = shelf_view_->GetBoundsInScreen();
@@ -2370,8 +2374,6 @@
private:
// Restores locale to the default when destructor is called.
base::test::ScopedRestoreICUDefaultLocale scoped_locale_;
-
- DISALLOW_COPY_AND_ASSIGN(ShelfViewVisibleBoundsTest);
};
TEST_P(ShelfViewVisibleBoundsTest, ItemsAreInBounds) {
diff --git a/ash/shelf/window_preview.h b/ash/shelf/window_preview.h
index e16a9d8..16bc06c2 100644
--- a/ash/shelf/window_preview.h
+++ b/ash/shelf/window_preview.h
@@ -45,6 +45,10 @@
WindowPreview(aura::Window* window,
Delegate* delegate,
const ui::NativeTheme* theme);
+
+ WindowPreview(const WindowPreview&) = delete;
+ WindowPreview& operator=(const WindowPreview&) = delete;
+
~WindowPreview() override;
// views::View:
@@ -71,8 +75,6 @@
// Unowned pointer to the delegate. The delegate should outlive this instance.
Delegate* delegate_;
-
- DISALLOW_COPY_AND_ASSIGN(WindowPreview);
};
} // namespace ash
diff --git a/ash/shell.h b/ash/shell.h
index 9e96df10..12122b7 100644
--- a/ash/shell.h
+++ b/ash/shell.h
@@ -224,6 +224,9 @@
public:
typedef std::vector<RootWindowController*> RootWindowControllerList;
+ Shell(const Shell&) = delete;
+ Shell& operator=(const Shell&) = delete;
+
// Creates the single Shell instance.
static Shell* CreateInstance(ShellInitParams init_params);
@@ -901,8 +904,6 @@
base::ObserverList<ShellObserver>::Unchecked shell_observers_;
base::WeakPtrFactory<Shell> weak_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(Shell);
};
} // namespace ash
diff --git a/ash/system/accessibility/tray_accessibility_unittest.cc b/ash/system/accessibility/tray_accessibility_unittest.cc
index e0982900..cc78f24 100644
--- a/ash/system/accessibility/tray_accessibility_unittest.cc
+++ b/ash/system/accessibility/tray_accessibility_unittest.cc
@@ -104,6 +104,10 @@
} // namespace
class TrayAccessibilityTest : public AshTestBase, public AccessibilityObserver {
+ public:
+ TrayAccessibilityTest(const TrayAccessibilityTest&) = delete;
+ TrayAccessibilityTest& operator=(const TrayAccessibilityTest&) = delete;
+
protected:
TrayAccessibilityTest() = default;
~TrayAccessibilityTest() override = default;
@@ -385,8 +389,6 @@
std::unique_ptr<DetailedViewDelegate> delegate_;
std::unique_ptr<tray::AccessibilityDetailedView> detailed_menu_;
-
- DISALLOW_COPY_AND_ASSIGN(TrayAccessibilityTest);
};
TEST_F(TrayAccessibilityTest, CheckMenuVisibilityOnDetailMenu) {
@@ -748,12 +750,15 @@
}
class TrayAccessibilityLoginScreenTest : public TrayAccessibilityTest {
+ public:
+ TrayAccessibilityLoginScreenTest(const TrayAccessibilityLoginScreenTest&) =
+ delete;
+ TrayAccessibilityLoginScreenTest& operator=(
+ const TrayAccessibilityLoginScreenTest&) = delete;
+
protected:
TrayAccessibilityLoginScreenTest() { set_start_session(false); }
~TrayAccessibilityLoginScreenTest() override = default;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(TrayAccessibilityLoginScreenTest);
};
TEST_F(TrayAccessibilityLoginScreenTest, CheckMarksOnDetailMenu) {
diff --git a/ash/system/bluetooth/bluetooth_notification_controller.cc b/ash/system/bluetooth/bluetooth_notification_controller.cc
index a005243..2388509 100644
--- a/ash/system/bluetooth/bluetooth_notification_controller.cc
+++ b/ash/system/bluetooth/bluetooth_notification_controller.cc
@@ -52,6 +52,11 @@
const std::string& address,
const std::string& notification_id);
+ BluetoothPairingNotificationDelegate(
+ const BluetoothPairingNotificationDelegate&) = delete;
+ BluetoothPairingNotificationDelegate& operator=(
+ const BluetoothPairingNotificationDelegate&) = delete;
+
protected:
~BluetoothPairingNotificationDelegate() override;
@@ -72,8 +77,6 @@
// Address of the device being paired.
const std::string address_;
const std::string notification_id_;
-
- DISALLOW_COPY_AND_ASSIGN(BluetoothPairingNotificationDelegate);
};
BluetoothPairingNotificationDelegate::BluetoothPairingNotificationDelegate(
@@ -140,6 +143,11 @@
public:
BluetoothPairedNotificationDelegate() = default;
+ BluetoothPairedNotificationDelegate(
+ const BluetoothPairedNotificationDelegate&) = delete;
+ BluetoothPairedNotificationDelegate& operator=(
+ const BluetoothPairedNotificationDelegate&) = delete;
+
protected:
~BluetoothPairedNotificationDelegate() override = default;
@@ -149,9 +157,6 @@
if (TrayPopupUtils::CanOpenWebUISettings())
Shell::Get()->system_tray_model()->client()->ShowBluetoothSettings();
}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(BluetoothPairedNotificationDelegate);
};
BluetoothNotificationController::BluetoothNotificationController(
diff --git a/ash/system/bluetooth/bluetooth_notification_controller_unittest.cc b/ash/system/bluetooth/bluetooth_notification_controller_unittest.cc
index a261520..8236c1c 100644
--- a/ash/system/bluetooth/bluetooth_notification_controller_unittest.cc
+++ b/ash/system/bluetooth/bluetooth_notification_controller_unittest.cc
@@ -61,6 +61,11 @@
public:
BluetoothNotificationControllerTest() = default;
+ BluetoothNotificationControllerTest(
+ const BluetoothNotificationControllerTest&) = delete;
+ BluetoothNotificationControllerTest& operator=(
+ const BluetoothNotificationControllerTest&) = delete;
+
void SetUp() override {
AshTestBase::SetUp();
@@ -156,8 +161,6 @@
TestSystemTrayClient* system_tray_client_;
std::unique_ptr<device::MockBluetoothDevice> bluetooth_device_1_;
std::unique_ptr<device::MockBluetoothDevice> bluetooth_device_2_;
-
- DISALLOW_COPY_AND_ASSIGN(BluetoothNotificationControllerTest);
};
TEST_F(BluetoothNotificationControllerTest, DiscoverableNotification) {
diff --git a/ash/system/ime_menu/ime_menu_tray.cc b/ash/system/ime_menu/ime_menu_tray.cc
index b38331f..44300131 100644
--- a/ash/system/ime_menu/ime_menu_tray.cc
+++ b/ash/system/ime_menu/ime_menu_tray.cc
@@ -268,6 +268,9 @@
public:
Delegate() : DetailedViewDelegate(nullptr /* tray_controller */) {}
+ Delegate(const Delegate&) = delete;
+ Delegate& operator=(const Delegate&) = delete;
+
// DetailedViewDelegate:
void TransitionToMainView(bool restore_focus) override {}
void CloseBubble() override {}
@@ -275,9 +278,6 @@
gfx::Insets GetInsetsForDetailedView() const override {
return gfx::Insets();
}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(Delegate);
};
explicit ImeMenuListView(std::unique_ptr<Delegate> delegate)
diff --git a/ash/system/locale/locale_update_controller_impl.cc b/ash/system/locale/locale_update_controller_impl.cc
index b68f86f0..42c9fe8 100644
--- a/ash/system/locale/locale_update_controller_impl.cc
+++ b/ash/system/locale/locale_update_controller_impl.cc
@@ -35,6 +35,10 @@
explicit LocaleNotificationDelegate(
base::OnceCallback<void(LocaleNotificationResult)> callback);
+ LocaleNotificationDelegate(const LocaleNotificationDelegate&) = delete;
+ LocaleNotificationDelegate& operator=(const LocaleNotificationDelegate&) =
+ delete;
+
protected:
~LocaleNotificationDelegate() override;
@@ -45,8 +49,6 @@
private:
base::OnceCallback<void(LocaleNotificationResult)> callback_;
-
- DISALLOW_COPY_AND_ASSIGN(LocaleNotificationDelegate);
};
LocaleNotificationDelegate::LocaleNotificationDelegate(
diff --git a/ash/system/message_center/message_center_ui_controller_unittest.cc b/ash/system/message_center/message_center_ui_controller_unittest.cc
index 3a60369..3ef5679 100644
--- a/ash/system/message_center/message_center_ui_controller_unittest.cc
+++ b/ash/system/message_center/message_center_ui_controller_unittest.cc
@@ -25,10 +25,11 @@
public:
TestNotificationDelegate() = default;
+ TestNotificationDelegate(const TestNotificationDelegate&) = delete;
+ TestNotificationDelegate& operator=(const TestNotificationDelegate&) = delete;
+
private:
~TestNotificationDelegate() override = default;
-
- DISALLOW_COPY_AND_ASSIGN(TestNotificationDelegate);
};
class MockDelegate : public MessageCenterUiDelegate {
diff --git a/ash/system/message_center/notifier_settings_view.cc b/ash/system/message_center/notifier_settings_view.cc
index 033412a9..76ad2bd 100644
--- a/ash/system/message_center/notifier_settings_view.cc
+++ b/ash/system/message_center/notifier_settings_view.cc
@@ -220,6 +220,9 @@
public:
ScrollContentsView() = default;
+ ScrollContentsView(const ScrollContentsView&) = delete;
+ ScrollContentsView& operator=(const ScrollContentsView&) = delete;
+
// views::View:
const char* GetClassName() const override { return "ScrollContentsView"; }
@@ -247,8 +250,6 @@
canvas->ClipRect(shadowed_area, SkClipOp::kDifference);
canvas->DrawRect(shadowed_area, flags);
}
-
- DISALLOW_COPY_AND_ASSIGN(ScrollContentsView);
};
// EmptyNotifierView -----------------------------------------------------------
@@ -285,6 +286,9 @@
label_ = AddChildView(label);
}
+ EmptyNotifierView(const EmptyNotifierView&) = delete;
+ EmptyNotifierView& operator=(const EmptyNotifierView&) = delete;
+
// views::View:
const char* GetClassName() const override { return "EmptyNotifierView"; }
@@ -296,7 +300,6 @@
}
views::Label* label_;
- DISALLOW_COPY_AND_ASSIGN(EmptyNotifierView);
};
class NotifierViewCheckbox : public views::Checkbox {
diff --git a/ash/system/network/auto_connect_notifier_unittest.cc b/ash/system/network/auto_connect_notifier_unittest.cc
index ce15a34..316d239 100644
--- a/ash/system/network/auto_connect_notifier_unittest.cc
+++ b/ash/system/network/auto_connect_notifier_unittest.cc
@@ -36,6 +36,10 @@
} // namespace
class AutoConnectNotifierTest : public AshTestBase {
+ public:
+ AutoConnectNotifierTest(const AutoConnectNotifierTest&) = delete;
+ AutoConnectNotifierTest& operator=(const AutoConnectNotifierTest&) = delete;
+
protected:
AutoConnectNotifierTest() = default;
~AutoConnectNotifierTest() override = default;
@@ -99,8 +103,6 @@
network_handler_test_helper_;
std::unique_ptr<chromeos::network_config::CrosNetworkConfigTestHelper>
network_config_helper_;
-
- DISALLOW_COPY_AND_ASSIGN(AutoConnectNotifierTest);
};
TEST_F(AutoConnectNotifierTest, NoExplicitConnectionRequested) {
diff --git a/ash/system/network/network_icon.cc b/ash/system/network/network_icon.cc
index bd951780..38c390a 100644
--- a/ash/system/network/network_icon.cc
+++ b/ash/system/network/network_icon.cc
@@ -50,6 +50,9 @@
IconType icon_type,
NetworkType network_type);
+ NetworkIconImpl(const NetworkIconImpl&) = delete;
+ NetworkIconImpl& operator=(const NetworkIconImpl&) = delete;
+
// Determines whether or not the associated network might be dirty and if so
// updates and generates the icon. Does nothing if network no longer exists.
void Update(const NetworkStateProperties* network, bool show_vpn_badge);
@@ -82,8 +85,6 @@
// Generated icon image.
gfx::ImageSkia image_;
-
- DISALLOW_COPY_AND_ASSIGN(NetworkIconImpl);
};
//------------------------------------------------------------------------------
diff --git a/ash/system/network/vpn_list.h b/ash/system/network/vpn_list.h
index 77ab02b..5096e3e 100644
--- a/ash/system/network/vpn_list.h
+++ b/ash/system/network/vpn_list.h
@@ -32,16 +32,19 @@
// the primary user's profile changes.
class Observer {
public:
+ Observer& operator=(const Observer&) = delete;
+
virtual void OnVpnProvidersChanged() = 0;
protected:
virtual ~Observer();
-
- private:
- DISALLOW_ASSIGN(Observer);
};
explicit VpnList(TrayNetworkStateModel* model);
+
+ VpnList(const VpnList&) = delete;
+ VpnList& operator=(const VpnList&) = delete;
+
~VpnList() override;
const std::vector<VpnProviderPtr>& extension_vpn_providers() {
@@ -90,8 +93,6 @@
std::vector<VpnProviderPtr> arc_vpn_providers_;
base::ObserverList<Observer>::Unchecked observer_list_;
-
- DISALLOW_COPY_AND_ASSIGN(VpnList);
};
} // namespace ash
diff --git a/ash/system/network/vpn_list_view.cc b/ash/system/network/vpn_list_view.cc
index 96414ec..c5379d5 100644
--- a/ash/system/network/vpn_list_view.cc
+++ b/ash/system/network/vpn_list_view.cc
@@ -162,6 +162,9 @@
tri_view->AddView(TriView::Container::END, add_vpn_button);
}
+ VPNListProviderEntry(const VPNListProviderEntry&) = delete;
+ VPNListProviderEntry& operator=(const VPNListProviderEntry&) = delete;
+
// views::View:
const char* GetClassName() const override { return "VPNListProviderEntry"; }
@@ -200,8 +203,6 @@
}
VpnProviderPtr vpn_provider_;
-
- DISALLOW_COPY_AND_ASSIGN(VPNListProviderEntry);
};
// A list entry that represents a network. If the network is currently
diff --git a/ash/system/palette/common_palette_tool.h b/ash/system/palette/common_palette_tool.h
index 8765849..27d6502 100644
--- a/ash/system/palette/common_palette_tool.h
+++ b/ash/system/palette/common_palette_tool.h
@@ -23,6 +23,10 @@
class CommonPaletteTool : public PaletteTool, public ViewClickListener {
protected:
explicit CommonPaletteTool(Delegate* delegate);
+
+ CommonPaletteTool(const CommonPaletteTool&) = delete;
+ CommonPaletteTool& operator=(const CommonPaletteTool&) = delete;
+
~CommonPaletteTool() override;
// PaletteTool:
@@ -46,8 +50,6 @@
// start_time_ is initialized when the tool becomes active.
// Used for recording UMA metrics.
base::TimeTicks start_time_;
-
- DISALLOW_COPY_AND_ASSIGN(CommonPaletteTool);
};
} // namespace ash
diff --git a/ash/system/palette/palette_tool.h b/ash/system/palette/palette_tool.h
index b0be956..c48d963 100644
--- a/ash/system/palette/palette_tool.h
+++ b/ash/system/palette/palette_tool.h
@@ -67,6 +67,10 @@
// |delegate| must outlive this tool instance.
explicit PaletteTool(Delegate* delegate);
+
+ PaletteTool(const PaletteTool&) = delete;
+ PaletteTool& operator=(const PaletteTool&) = delete;
+
virtual ~PaletteTool();
// The group this tool belongs to. Only one tool per group can be active at
@@ -111,8 +115,6 @@
// Unowned pointer to the delegate. The delegate should outlive this instance.
Delegate* delegate_;
-
- DISALLOW_COPY_AND_ASSIGN(PaletteTool);
};
} // namespace ash
diff --git a/ash/system/palette/palette_tool_manager.h b/ash/system/palette/palette_tool_manager.h
index 939685f5..c953e648 100644
--- a/ash/system/palette/palette_tool_manager.h
+++ b/ash/system/palette/palette_tool_manager.h
@@ -64,6 +64,10 @@
// Creates the tool manager.
PaletteToolManager(Delegate* delegate);
+
+ PaletteToolManager(const PaletteToolManager&) = delete;
+ PaletteToolManager& operator=(const PaletteToolManager&) = delete;
+
~PaletteToolManager() override;
// Returns true if the given tool has been added to the tool manager.
@@ -121,8 +125,6 @@
// Owned list of all tools.
std::vector<std::unique_ptr<PaletteTool>> tools_;
-
- DISALLOW_COPY_AND_ASSIGN(PaletteToolManager);
};
} // namespace ash
diff --git a/ash/system/palette/palette_tool_manager_unittest.cc b/ash/system/palette/palette_tool_manager_unittest.cc
index 868f541..3b890df 100644
--- a/ash/system/palette/palette_tool_manager_unittest.cc
+++ b/ash/system/palette/palette_tool_manager_unittest.cc
@@ -22,6 +22,9 @@
TestTool(Delegate* delegate, PaletteGroup group, PaletteToolId tool_id)
: PaletteTool(delegate), group_(group), tool_id_(tool_id) {}
+ TestTool(const TestTool&) = delete;
+ TestTool& operator=(const TestTool&) = delete;
+
// PaletteTool:
PaletteGroup GetGroup() const override { return group_; }
PaletteToolId GetToolId() const override { return tool_id_; }
@@ -39,8 +42,6 @@
PaletteGroup group_;
PaletteToolId tool_id_;
-
- DISALLOW_COPY_AND_ASSIGN(TestTool);
};
// Base class for tool manager unittests.
diff --git a/ash/system/power/peripheral_battery_notifier_listener_integration_test.cc b/ash/system/power/peripheral_battery_notifier_listener_integration_test.cc
index 57a97ef1..7d8da40 100644
--- a/ash/system/power/peripheral_battery_notifier_listener_integration_test.cc
+++ b/ash/system/power/peripheral_battery_notifier_listener_integration_test.cc
@@ -163,11 +163,13 @@
PeripheralBatteryNotifierListenerIncompleteDevicesTest() {
set_complete_devices(false);
}
- ~PeripheralBatteryNotifierListenerIncompleteDevicesTest() override {}
- private:
- DISALLOW_COPY_AND_ASSIGN(
- PeripheralBatteryNotifierListenerIncompleteDevicesTest);
+ PeripheralBatteryNotifierListenerIncompleteDevicesTest(
+ const PeripheralBatteryNotifierListenerIncompleteDevicesTest&) = delete;
+ PeripheralBatteryNotifierListenerIncompleteDevicesTest& operator=(
+ const PeripheralBatteryNotifierListenerIncompleteDevicesTest&) = delete;
+
+ ~PeripheralBatteryNotifierListenerIncompleteDevicesTest() override {}
};
TEST_F(PeripheralBatteryNotifierListenerTest, Basic) {
diff --git a/ash/system/power/power_button_controller_unittest.cc b/ash/system/power/power_button_controller_unittest.cc
index 47d5693..f820322d 100644
--- a/ash/system/power/power_button_controller_unittest.cc
+++ b/ash/system/power/power_button_controller_unittest.cc
@@ -1115,6 +1115,11 @@
switches::kAshPowerButtonPosition, json_position_info);
}
+ PowerButtonControllerWithPositionTest(
+ const PowerButtonControllerWithPositionTest&) = delete;
+ PowerButtonControllerWithPositionTest& operator=(
+ const PowerButtonControllerWithPositionTest&) = delete;
+
bool IsLeftOrRightPosition() const {
return power_button_position_ == PowerButtonPosition::LEFT ||
power_button_position_ == PowerButtonPosition::RIGHT;
@@ -1140,8 +1145,6 @@
private:
PowerButtonPosition power_button_position_;
-
- DISALLOW_COPY_AND_ASSIGN(PowerButtonControllerWithPositionTest);
};
// TODO(crbug.com/1010194).
diff --git a/ash/system/power/power_button_screenshot_controller_unittest.cc b/ash/system/power/power_button_screenshot_controller_unittest.cc
index 6ef577a..87e1b9e 100644
--- a/ash/system/power/power_button_screenshot_controller_unittest.cc
+++ b/ash/system/power/power_button_screenshot_controller_unittest.cc
@@ -318,14 +318,17 @@
public:
PowerButtonScreenshotControllerWithKeyCodeTest() : key_code_(GetParam()) {}
+ PowerButtonScreenshotControllerWithKeyCodeTest(
+ const PowerButtonScreenshotControllerWithKeyCodeTest&) = delete;
+ PowerButtonScreenshotControllerWithKeyCodeTest& operator=(
+ const PowerButtonScreenshotControllerWithKeyCodeTest&) = delete;
+
ui::KeyboardCode key_code() const { return key_code_; }
private:
// Value of the |key_code_| will only be ui::VKEY_VOLUME_DOWN or
// ui::VKEY_VOLUME_UP.
ui::KeyboardCode key_code_ = ui::VKEY_UNKNOWN;
-
- DISALLOW_COPY_AND_ASSIGN(PowerButtonScreenshotControllerWithKeyCodeTest);
};
// Tests power button screenshot accelerator works in tablet mode only.
diff --git a/ash/system/power/power_notification_controller.cc b/ash/system/power/power_notification_controller.cc
index 842c5771..40f46a4 100644
--- a/ash/system/power/power_notification_controller.cc
+++ b/ash/system/power/power_notification_controller.cc
@@ -37,6 +37,9 @@
explicit UsbNotificationDelegate(PowerNotificationController* controller)
: controller_(controller) {}
+ UsbNotificationDelegate(const UsbNotificationDelegate&) = delete;
+ UsbNotificationDelegate& operator=(const UsbNotificationDelegate&) = delete;
+
// Overridden from message_center::NotificationDelegate.
void Close(bool by_user) override {
if (by_user)
@@ -47,8 +50,6 @@
~UsbNotificationDelegate() override = default;
PowerNotificationController* const controller_;
-
- DISALLOW_COPY_AND_ASSIGN(UsbNotificationDelegate);
};
std::string GetNotificationStateString(
diff --git a/ash/system/power/power_prefs_unittest.cc b/ash/system/power/power_prefs_unittest.cc
index 9f5cd56..520ffae 100644
--- a/ash/system/power/power_prefs_unittest.cc
+++ b/ash/system/power/power_prefs_unittest.cc
@@ -180,6 +180,10 @@
} // namespace
class PowerPrefsTest : public NoSessionAshTestBase {
+ public:
+ PowerPrefsTest(const PowerPrefsTest&) = delete;
+ PowerPrefsTest& operator=(const PowerPrefsTest&) = delete;
+
protected:
PowerPrefsTest() = default;
~PowerPrefsTest() override = default;
@@ -268,9 +272,6 @@
base::MakeRefCounted<PrefRegistrySimple>();
std::unique_ptr<PrefService> local_state_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(PowerPrefsTest);
};
TEST_F(PowerPrefsTest, LoginScreen) {
diff --git a/ash/system/power/power_status.h b/ash/system/power/power_status.h
index 79057b8..6575b43 100644
--- a/ash/system/power/power_status.h
+++ b/ash/system/power/power_status.h
@@ -100,6 +100,9 @@
// percentage of charge remaining.
static const double kCriticalBatteryChargePercentage;
+ PowerStatus(const PowerStatus&) = delete;
+ PowerStatus& operator=(const PowerStatus&) = delete;
+
// Sets the global instance. Must be called before any calls to Get().
static void Initialize();
@@ -230,8 +233,6 @@
// Current state.
power_manager::PowerSupplyProperties proto_;
-
- DISALLOW_COPY_AND_ASSIGN(PowerStatus);
};
} // namespace ash
diff --git a/ash/system/session/logout_confirmation_controller_unittest.cc b/ash/system/session/logout_confirmation_controller_unittest.cc
index 9eea6c3..d3504af 100644
--- a/ash/system/session/logout_confirmation_controller_unittest.cc
+++ b/ash/system/session/logout_confirmation_controller_unittest.cc
@@ -29,6 +29,12 @@
constexpr char kUserEmail[] = "user1@test.com";
class LogoutConfirmationControllerTest : public testing::Test {
+ public:
+ LogoutConfirmationControllerTest(const LogoutConfirmationControllerTest&) =
+ delete;
+ LogoutConfirmationControllerTest& operator=(
+ const LogoutConfirmationControllerTest&) = delete;
+
protected:
LogoutConfirmationControllerTest();
~LogoutConfirmationControllerTest() override;
@@ -41,9 +47,6 @@
base::ThreadTaskRunnerHandle runner_handle_;
LogoutConfirmationController controller_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(LogoutConfirmationControllerTest);
};
LogoutConfirmationControllerTest::LogoutConfirmationControllerTest()
diff --git a/ash/system/session/session_limit_notification_controller_unittest.cc b/ash/system/session/session_limit_notification_controller_unittest.cc
index cf8ef1a2b..5bd16cec 100644
--- a/ash/system/session/session_limit_notification_controller_unittest.cc
+++ b/ash/system/session/session_limit_notification_controller_unittest.cc
@@ -169,8 +169,10 @@
public:
SessionLimitNotificationControllerLoginTest() { set_start_session(false); }
- private:
- DISALLOW_COPY_AND_ASSIGN(SessionLimitNotificationControllerLoginTest);
+ SessionLimitNotificationControllerLoginTest(
+ const SessionLimitNotificationControllerLoginTest&) = delete;
+ SessionLimitNotificationControllerLoginTest& operator=(
+ const SessionLimitNotificationControllerLoginTest&) = delete;
};
TEST_F(SessionLimitNotificationControllerLoginTest,
diff --git a/ash/system/status_area_widget.h b/ash/system/status_area_widget.h
index c032b0c..e13736a 100644
--- a/ash/system/status_area_widget.h
+++ b/ash/system/status_area_widget.h
@@ -60,6 +60,10 @@
};
StatusAreaWidget(aura::Window* status_container, Shelf* shelf);
+
+ StatusAreaWidget(const StatusAreaWidget&) = delete;
+ StatusAreaWidget& operator=(const StatusAreaWidget&) = delete;
+
~StatusAreaWidget() override;
// Returns the status area widget for the display that |window| is on.
@@ -252,8 +256,6 @@
int tray_bubble_count_ = 0;
base::WeakPtrFactory<StatusAreaWidget> weak_ptr_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(StatusAreaWidget);
};
} // namespace ash
diff --git a/ash/system/status_area_widget_test_helper.h b/ash/system/status_area_widget_test_helper.h
index c28158a..c8e6c87 100644
--- a/ash/system/status_area_widget_test_helper.h
+++ b/ash/system/status_area_widget_test_helper.h
@@ -15,6 +15,11 @@
class StatusAreaWidgetTestHelper {
public:
+ StatusAreaWidgetTestHelper() = delete;
+ StatusAreaWidgetTestHelper(const StatusAreaWidgetTestHelper&) = delete;
+ StatusAreaWidgetTestHelper& operator=(const StatusAreaWidgetTestHelper&) =
+ delete;
+
static LoginStatus GetUserLoginStatus();
// Returns the StatusAreaWidget that appears on the primary display.
@@ -28,9 +33,6 @@
// Waits until one child view's layer animations are over.
static void WaitForLayerAnimationEnd(ui::Layer* layer);
-
- private:
- DISALLOW_IMPLICIT_CONSTRUCTORS(StatusAreaWidgetTestHelper);
};
} // namespace ash
diff --git a/ash/system/tray/size_range_layout_unittest.cc b/ash/system/tray/size_range_layout_unittest.cc
index 97f8228..498fc9b 100644
--- a/ash/system/tray/size_range_layout_unittest.cc
+++ b/ash/system/tray/size_range_layout_unittest.cc
@@ -15,6 +15,9 @@
public:
SizeRangeLayoutTest();
+ SizeRangeLayoutTest(const SizeRangeLayoutTest&) = delete;
+ SizeRangeLayoutTest& operator=(const SizeRangeLayoutTest&) = delete;
+
// Wrapper function to access the minimum preferred size of |layout|.
gfx::Size GetMinSize(const SizeRangeLayout* layout) const;
@@ -26,9 +29,6 @@
const gfx::Size kAbsoluteMinSize;
const gfx::Size kAbsoluteMaxSize;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(SizeRangeLayoutTest);
};
SizeRangeLayoutTest::SizeRangeLayoutTest()
diff --git a/ash/system/tray/tray_background_view.cc b/ash/system/tray/tray_background_view.cc
index b7b0c6ed..2fc46c5 100644
--- a/ash/system/tray/tray_background_view.cc
+++ b/ash/system/tray/tray_background_view.cc
@@ -145,6 +145,9 @@
public:
explicit TrayWidgetObserver(TrayBackgroundView* host) : host_(host) {}
+ TrayWidgetObserver(const TrayWidgetObserver&) = delete;
+ TrayWidgetObserver& operator=(const TrayWidgetObserver&) = delete;
+
void OnWidgetBoundsChanged(views::Widget* widget,
const gfx::Rect& new_bounds) override {
host_->AnchorUpdated();
@@ -160,8 +163,6 @@
TrayBackgroundView* host_;
base::ScopedMultiSourceObservation<views::Widget, views::WidgetObserver>
observations_{this};
-
- DISALLOW_COPY_AND_ASSIGN(TrayWidgetObserver);
};
// Handles `TrayBackgroundView`'s animation on session changed.
diff --git a/ash/system/tray/tray_popup_utils.h b/ash/system/tray/tray_popup_utils.h
index 342dddc..92bae35 100644
--- a/ash/system/tray/tray_popup_utils.h
+++ b/ash/system/tray/tray_popup_utils.h
@@ -50,6 +50,10 @@
kSystemInfo,
};
+ TrayPopupUtils() = delete;
+ TrayPopupUtils(const TrayPopupUtils&) = delete;
+ TrayPopupUtils& operator=(const TrayPopupUtils&) = delete;
+
// Creates a default container view to be used by system menu rows that are
// either a single targetable area or not targetable at all. The caller takes
// over ownership of the created view.
@@ -209,9 +213,6 @@
// Sets the font list for |label| based on |style|.
static void SetLabelFontList(views::Label* label, FontStyle style);
-
- private:
- DISALLOW_IMPLICIT_CONSTRUCTORS(TrayPopupUtils);
};
} // namespace ash
diff --git a/ash/system/tray/tri_view.cc b/ash/system/tray/tri_view.cc
index 3660e9e..d1b0583b 100644
--- a/ash/system/tray/tri_view.cc
+++ b/ash/system/tray/tri_view.cc
@@ -34,11 +34,11 @@
public:
RelayoutView() = default;
+ RelayoutView(const RelayoutView&) = delete;
+ RelayoutView& operator=(const RelayoutView&) = delete;
+
// views::View:
void ChildPreferredSizeChanged(View* child) override { Layout(); }
-
- private:
- DISALLOW_COPY_AND_ASSIGN(RelayoutView);
};
} // namespace
diff --git a/ash/system/tray/tri_view_unittest.cc b/ash/system/tray/tri_view_unittest.cc
index f16bcb9..528f30f1 100644
--- a/ash/system/tray/tri_view_unittest.cc
+++ b/ash/system/tray/tri_view_unittest.cc
@@ -33,6 +33,9 @@
public:
TriViewTest();
+ TriViewTest(const TriViewTest&) = delete;
+ TriViewTest& operator=(const TriViewTest&) = delete;
+
protected:
// Convenience function to get the minimum height of |container|.
int GetMinHeight(TriView::Container container) const;
@@ -46,9 +49,6 @@
// The test target.
std::unique_ptr<TriView> tri_view_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(TriViewTest);
};
TriViewTest::TriViewTest() : tri_view_(std::make_unique<TriView>()) {}
diff --git a/ash/system/unified/custom_shape_button.cc b/ash/system/unified/custom_shape_button.cc
index 91e0baf..babbe633 100644
--- a/ash/system/unified/custom_shape_button.cc
+++ b/ash/system/unified/custom_shape_button.cc
@@ -23,13 +23,15 @@
public:
CustomShapeButtonHighlightPathGenerator() = default;
+ CustomShapeButtonHighlightPathGenerator(
+ const CustomShapeButtonHighlightPathGenerator&) = delete;
+ CustomShapeButtonHighlightPathGenerator& operator=(
+ const CustomShapeButtonHighlightPathGenerator&) = delete;
+
SkPath GetHighlightPath(const views::View* view) override {
return static_cast<const ash::CustomShapeButton*>(view)
->CreateCustomShapePath(view->GetLocalBounds());
}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(CustomShapeButtonHighlightPathGenerator);
};
} // namespace
diff --git a/ash/system/unified/notification_counter_view.cc b/ash/system/unified/notification_counter_view.cc
index 9d040ab..457c56c 100644
--- a/ash/system/unified/notification_counter_view.cc
+++ b/ash/system/unified/notification_counter_view.cc
@@ -71,6 +71,9 @@
DCHECK_LE(count_, kTrayNotificationMaxCount + 1);
}
+ NumberIconImageSource(const NumberIconImageSource&) = delete;
+ NumberIconImageSource& operator=(const NumberIconImageSource&) = delete;
+
void Draw(gfx::Canvas* canvas) override {
SkColor tray_icon_color =
TrayIconColor(Shell::Get()->session_controller()->GetSessionState());
@@ -97,8 +100,6 @@
private:
size_t count_;
-
- DISALLOW_COPY_AND_ASSIGN(NumberIconImageSource);
};
} // namespace
diff --git a/ash/system/unified/top_shortcuts_view.h b/ash/system/unified/top_shortcuts_view.h
index 8761538..579a417 100644
--- a/ash/system/unified/top_shortcuts_view.h
+++ b/ash/system/unified/top_shortcuts_view.h
@@ -56,6 +56,9 @@
public:
explicit TopShortcutsView(UnifiedSystemTrayController* controller);
+ TopShortcutsView(const TopShortcutsView&) = delete;
+ TopShortcutsView& operator=(const TopShortcutsView&) = delete;
+
static void RegisterLocalStatePrefs(PrefRegistrySimple* registry);
// Change the expanded state. CollapseButton icon will rotate.
@@ -80,8 +83,6 @@
CollapseButton* collapse_button_ = nullptr;
PrefChangeRegistrar local_state_pref_change_registrar_;
-
- DISALLOW_COPY_AND_ASSIGN(TopShortcutsView);
};
} // namespace ash
diff --git a/ash/system/unified/user_chooser_view.cc b/ash/system/unified/user_chooser_view.cc
index a02ec0b..58bab84c 100644
--- a/ash/system/unified/user_chooser_view.cc
+++ b/ash/system/unified/user_chooser_view.cc
@@ -99,7 +99,8 @@
ContentLayerType::kSeparatorColor)));
}
- DISALLOW_COPY_AND_ASSIGN(Separator);
+ Separator(const Separator&) = delete;
+ Separator& operator=(const Separator&) = delete;
};
views::View* CreateAddUserErrorView(const std::u16string& message) {
diff --git a/ash/test/toplevel_window.h b/ash/test/toplevel_window.h
index bf07671d..3249cf2e6 100644
--- a/ash/test/toplevel_window.h
+++ b/ash/test/toplevel_window.h
@@ -20,6 +20,10 @@
bool can_maximize;
bool use_saved_placement;
};
+
+ ToplevelWindow(const ToplevelWindow&) = delete;
+ ToplevelWindow& operator=(const ToplevelWindow&) = delete;
+
static views::Widget* CreateToplevelWindow(const CreateParams& params);
// Clears saved show state and bounds used to position
@@ -41,8 +45,6 @@
ui::WindowShowState* show_state) const override;
bool use_saved_placement_ = true;
-
- DISALLOW_COPY_AND_ASSIGN(ToplevelWindow);
};
} // namespace shell
diff --git a/ash/touch/touch_hud_debug.cc b/ash/touch/touch_hud_debug.cc
index c78345e..88a3bed2 100644
--- a/ash/touch/touch_hud_debug.cc
+++ b/ash/touch/touch_hud_debug.cc
@@ -93,6 +93,9 @@
TouchTrace() = default;
+ TouchTrace(const TouchTrace&) = delete;
+ TouchTrace& operator=(const TouchTrace&) = delete;
+
void AddTouchPoint(const ui::TouchEvent& touch) {
log_.push_back(TouchPointLog(touch));
}
@@ -108,8 +111,6 @@
private:
std::vector<TouchPointLog> log_;
-
- DISALLOW_COPY_AND_ASSIGN(TouchTrace);
};
// A TouchLog keeps track of all touch events of all touch points.
@@ -117,6 +118,9 @@
public:
TouchLog() : next_trace_index_(0) {}
+ TouchLog(const TouchLog&) = delete;
+ TouchLog& operator=(const TouchLog&) = delete;
+
void AddTouchPoint(const ui::TouchEvent& touch) {
if (touch.type() == ui::ET_TOUCH_PRESSED)
StartTrace(touch);
@@ -161,8 +165,6 @@
int next_trace_index_;
std::map<int, int> touch_id_to_trace_index_;
-
- DISALLOW_COPY_AND_ASSIGN(TouchLog);
};
// TouchHudCanvas draws touch traces in |FULLSCREEN| and |REDUCED_SCALE| modes.
diff --git a/ash/touch/touch_hud_debug.h b/ash/touch/touch_hud_debug.h
index e35780c..9baa8cd 100644
--- a/ash/touch/touch_hud_debug.h
+++ b/ash/touch/touch_hud_debug.h
@@ -36,6 +36,9 @@
explicit TouchHudDebug(aura::Window* initial_root);
+ TouchHudDebug(const TouchHudDebug&) = delete;
+ TouchHudDebug& operator=(const TouchHudDebug&) = delete;
+
// Changes the display mode (e.g. scale, visibility). Calling this repeatedly
// cycles between a fixed number of display modes.
void ChangeToNextMode();
@@ -69,8 +72,6 @@
TouchHudCanvas* canvas_;
views::View* label_container_;
views::Label* touch_labels_[kMaxTouchPoints];
-
- DISALLOW_COPY_AND_ASSIGN(TouchHudDebug);
};
} // namespace ash
diff --git a/ash/touch/touch_hud_projection.h b/ash/touch/touch_hud_projection.h
index 22ba9c62..496dcd5 100644
--- a/ash/touch/touch_hud_projection.h
+++ b/ash/touch/touch_hud_projection.h
@@ -18,6 +18,9 @@
public:
explicit TouchHudProjection(aura::Window* initial_root);
+ TouchHudProjection(const TouchHudProjection&) = delete;
+ TouchHudProjection& operator=(const TouchHudProjection&) = delete;
+
// TouchObserverHud:
void Clear() override;
@@ -34,8 +37,6 @@
// TouchHudRenderer draws out the touch points.
std::unique_ptr<TouchHudRenderer> touch_hud_renderer_;
-
- DISALLOW_COPY_AND_ASSIGN(TouchHudProjection);
};
} // namespace ash
diff --git a/ash/touch/touch_observer_hud.h b/ash/touch/touch_observer_hud.h
index f4e1c1f..4c7ce36 100644
--- a/ash/touch/touch_observer_hud.h
+++ b/ash/touch/touch_observer_hud.h
@@ -34,6 +34,9 @@
public display::DisplayConfigurator::Observer,
public WindowTreeHostManager::Observer {
public:
+ TouchObserverHud(const TouchObserverHud&) = delete;
+ TouchObserverHud& operator=(const TouchObserverHud&) = delete;
+
// Called to clear touch points and traces from the screen.
virtual void Clear() = 0;
@@ -85,8 +88,6 @@
views::Widget* widget_;
display::ScopedDisplayObserver display_observer_{this};
-
- DISALLOW_COPY_AND_ASSIGN(TouchObserverHud);
};
} // namespace ash
diff --git a/ash/wallpaper/wallpaper_view.cc b/ash/wallpaper/wallpaper_view.cc
index d03ffba..167a496 100644
--- a/ash/wallpaper/wallpaper_view.cc
+++ b/ash/wallpaper/wallpaper_view.cc
@@ -43,6 +43,9 @@
view->SetPaintToLayer();
}
+ WallpaperWidgetDelegate(const WallpaperWidgetDelegate&) = delete;
+ WallpaperWidgetDelegate& operator=(const WallpaperWidgetDelegate&) = delete;
+
// Overrides views::View.
void Layout() override {
aura::Window* window = GetWidget()->GetNativeWindow();
@@ -63,9 +66,6 @@
child->SetTransform(transform);
}
}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(WallpaperWidgetDelegate);
};
} // namespace
diff --git a/ash/wm/desks/desks_controller.h b/ash/wm/desks/desks_controller.h
index 7f73521d..96c2bb2 100644
--- a/ash/wm/desks/desks_controller.h
+++ b/ash/wm/desks/desks_controller.h
@@ -74,6 +74,10 @@
};
DesksController();
+
+ DesksController(const DesksController&) = delete;
+ DesksController& operator=(const DesksController&) = delete;
+
~DesksController() override;
// Convenience method for returning the DesksController instance.
@@ -370,8 +374,6 @@
// Scheduler for reporting the weekly active desks metric.
base::OneShotTimer weekly_active_desks_scheduler_;
-
- DISALLOW_COPY_AND_ASSIGN(DesksController);
};
} // namespace ash
diff --git a/ash/wm/lock_action_handler_layout_manager_unittest.cc b/ash/wm/lock_action_handler_layout_manager_unittest.cc
index 8d61ebe..aa2a6af 100644
--- a/ash/wm/lock_action_handler_layout_manager_unittest.cc
+++ b/ash/wm/lock_action_handler_layout_manager_unittest.cc
@@ -170,6 +170,14 @@
: public LockActionHandlerLayoutManagerTest {
public:
LockActionHandlerLayoutManagerTestWithTestBackgroundController() = default;
+
+ LockActionHandlerLayoutManagerTestWithTestBackgroundController(
+ const LockActionHandlerLayoutManagerTestWithTestBackgroundController&) =
+ delete;
+ LockActionHandlerLayoutManagerTestWithTestBackgroundController& operator=(
+ const LockActionHandlerLayoutManagerTestWithTestBackgroundController&) =
+ delete;
+
~LockActionHandlerLayoutManagerTestWithTestBackgroundController() override =
default;
@@ -194,9 +202,6 @@
// The lock screen action background controller created by
// |CreateActionBackgroundController|.
TestLockScreenActionBackgroundController* background_controller_ = nullptr;
-
- DISALLOW_COPY_AND_ASSIGN(
- LockActionHandlerLayoutManagerTestWithTestBackgroundController);
};
TEST_F(LockActionHandlerLayoutManagerTest, PreserveNormalWindowBounds) {
diff --git a/ash/wm/overview/overview_highlight_controller.h b/ash/wm/overview/overview_highlight_controller.h
index d8a3620..ef761f7f 100644
--- a/ash/wm/overview/overview_highlight_controller.h
+++ b/ash/wm/overview/overview_highlight_controller.h
@@ -82,6 +82,11 @@
};
explicit OverviewHighlightController(OverviewSession* overview_session);
+
+ OverviewHighlightController(const OverviewHighlightController&) = delete;
+ OverviewHighlightController& operator=(const OverviewHighlightController&) =
+ delete;
+
~OverviewHighlightController();
// Moves the focus ring to the next traversable view.
@@ -151,8 +156,6 @@
// The current view that is being tab dragged, if any.
OverviewHighlightableView* tab_dragged_view_ = nullptr;
-
- DISALLOW_COPY_AND_ASSIGN(OverviewHighlightController);
};
} // namespace ash
diff --git a/ash/wm/root_window_layout_manager_unittest.cc b/ash/wm/root_window_layout_manager_unittest.cc
index 62ced3f..68556c8 100644
--- a/ash/wm/root_window_layout_manager_unittest.cc
+++ b/ash/wm/root_window_layout_manager_unittest.cc
@@ -15,6 +15,9 @@
public:
explicit WindowDeleter(aura::Window* window) : target_(window) {}
+ WindowDeleter(const WindowDeleter&) = delete;
+ WindowDeleter& operator=(const WindowDeleter&) = delete;
+
// aura::WindowObserver::
void OnWindowBoundsChanged(aura::Window* window,
const gfx::Rect& old_bounds,
@@ -25,8 +28,6 @@
private:
aura::Window* target_;
-
- DISALLOW_COPY_AND_ASSIGN(WindowDeleter);
};
} // namespace
diff --git a/ash/wm/screen_pinning_controller.cc b/ash/wm/screen_pinning_controller.cc
index 8ef5b03..65c70df 100644
--- a/ash/wm/screen_pinning_controller.cc
+++ b/ash/wm/screen_pinning_controller.cc
@@ -69,13 +69,17 @@
ScreenPinningController* controller)
: controller_(controller) {}
+ PinnedContainerChildWindowObserver(
+ const PinnedContainerChildWindowObserver&) = delete;
+ PinnedContainerChildWindowObserver& operator=(
+ const PinnedContainerChildWindowObserver&) = delete;
+
void OnWindowStackingChanged(aura::Window* window) override {
controller_->OnPinnedContainerWindowStackingChanged(window);
}
private:
ScreenPinningController* controller_;
- DISALLOW_COPY_AND_ASSIGN(PinnedContainerChildWindowObserver);
};
// Adapter to translate OnWindowAdded/OnWillRemoveWindow for the container
@@ -86,6 +90,10 @@
explicit PinnedContainerWindowObserver(ScreenPinningController* controller)
: controller_(controller) {}
+ PinnedContainerWindowObserver(const PinnedContainerWindowObserver&) = delete;
+ PinnedContainerWindowObserver& operator=(
+ const PinnedContainerWindowObserver&) = delete;
+
void OnWindowAdded(aura::Window* new_window) override {
controller_->OnWindowAddedToPinnedContainer(new_window);
}
@@ -99,7 +107,6 @@
private:
ScreenPinningController* controller_;
- DISALLOW_COPY_AND_ASSIGN(PinnedContainerWindowObserver);
};
// Adapter to fire OnSystemModalContainerWindowStackingChanged().
@@ -110,13 +117,17 @@
ScreenPinningController* controller)
: controller_(controller) {}
+ SystemModalContainerChildWindowObserver(
+ const SystemModalContainerChildWindowObserver&) = delete;
+ SystemModalContainerChildWindowObserver& operator=(
+ const SystemModalContainerChildWindowObserver&) = delete;
+
void OnWindowStackingChanged(aura::Window* window) override {
controller_->OnSystemModalContainerWindowStackingChanged(window);
}
private:
ScreenPinningController* controller_;
- DISALLOW_COPY_AND_ASSIGN(SystemModalContainerChildWindowObserver);
};
// Adapter to translate OnWindowAdded/OnWillRemoveWindow for the
@@ -128,6 +139,11 @@
ScreenPinningController* controller)
: controller_(controller) {}
+ SystemModalContainerWindowObserver(
+ const SystemModalContainerWindowObserver&) = delete;
+ SystemModalContainerWindowObserver& operator=(
+ const SystemModalContainerWindowObserver&) = delete;
+
void OnWindowAdded(aura::Window* new_window) override {
controller_->OnWindowAddedToSystemModalContainer(new_window);
}
@@ -141,7 +157,6 @@
private:
ScreenPinningController* controller_;
- DISALLOW_COPY_AND_ASSIGN(SystemModalContainerWindowObserver);
};
ScreenPinningController::ScreenPinningController()
diff --git a/ash/wm/session_state_animator.h b/ash/wm/session_state_animator.h
index febf5b5..7ca47f4 100644
--- a/ash/wm/session_state_animator.h
+++ b/ash/wm/session_state_animator.h
@@ -166,6 +166,10 @@
};
SessionStateAnimator();
+
+ SessionStateAnimator(const SessionStateAnimator&) = delete;
+ SessionStateAnimator& operator=(const SessionStateAnimator&) = delete;
+
virtual ~SessionStateAnimator();
// Reports animation duration for |speed|.
@@ -199,9 +203,6 @@
// Hides the wallpaper immediately.
virtual void HideWallpaper() = 0;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(SessionStateAnimator);
};
} // namespace ash
diff --git a/ash/wm/session_state_animator_impl.cc b/ash/wm/session_state_animator_impl.cc
index a7e159d..236dca9d 100644
--- a/ash/wm/session_state_animator_impl.cc
+++ b/ash/wm/session_state_animator_impl.cc
@@ -342,6 +342,9 @@
sequences_attached_(0),
sequences_completed_(0) {}
+ AnimationSequence(const AnimationSequence&) = delete;
+ AnimationSequence& operator=(const AnimationSequence&) = delete;
+
// SessionStateAnimator::AnimationSequence:
void StartAnimation(int container_mask,
SessionStateAnimator::AnimationType type,
@@ -380,8 +383,6 @@
// Number of sequences either ended or aborted.
int sequences_completed_;
-
- DISALLOW_COPY_AND_ASSIGN(AnimationSequence);
};
bool SessionStateAnimatorImpl::TestApi::ContainersAreAnimated(
diff --git a/ash/wm/session_state_animator_impl.h b/ash/wm/session_state_animator_impl.h
index 9e7e8fe..7794cfd 100644
--- a/ash/wm/session_state_animator_impl.h
+++ b/ash/wm/session_state_animator_impl.h
@@ -26,6 +26,9 @@
explicit TestApi(SessionStateAnimatorImpl* animator)
: animator_(animator) {}
+ TestApi(const TestApi&) = delete;
+ TestApi& operator=(const TestApi&) = delete;
+
// Returns true if containers of a given |container_mask|
// were last animated with |type| (probably; the analysis is fairly ad-hoc).
// |container_mask| is a bitfield of a Container.
@@ -38,11 +41,13 @@
private:
SessionStateAnimatorImpl* animator_; // not owned
-
- DISALLOW_COPY_AND_ASSIGN(TestApi);
};
SessionStateAnimatorImpl();
+
+ SessionStateAnimatorImpl(const SessionStateAnimatorImpl&) = delete;
+ SessionStateAnimatorImpl& operator=(const SessionStateAnimatorImpl&) = delete;
+
~SessionStateAnimatorImpl() override;
// Fills |containers| with the containers included in |container_mask|.
@@ -78,8 +83,6 @@
SessionStateAnimator::AnimationType type,
SessionStateAnimator::AnimationSpeed speed,
ui::LayerAnimationObserver* observer);
-
- DISALLOW_COPY_AND_ASSIGN(SessionStateAnimatorImpl);
};
} // namespace ash
diff --git a/ash/wm/system_gesture_event_filter_unittest.cc b/ash/wm/system_gesture_event_filter_unittest.cc
index eb177d8..0f028e9 100644
--- a/ash/wm/system_gesture_event_filter_unittest.cc
+++ b/ash/wm/system_gesture_event_filter_unittest.cc
@@ -57,6 +57,9 @@
public:
MaxSizeNCFV() = default;
+ MaxSizeNCFV(const MaxSizeNCFV&) = delete;
+ MaxSizeNCFV& operator=(const MaxSizeNCFV&) = delete;
+
private:
gfx::Size GetMaximumSize() const override { return gfx::Size(200, 200); }
gfx::Rect GetBoundsForClientView() const override { return gfx::Rect(); }
@@ -76,8 +79,6 @@
void UpdateWindowIcon() override {}
void UpdateWindowTitle() override {}
void SizeConstraintsChanged() override {}
-
- DISALLOW_COPY_AND_ASSIGN(MaxSizeNCFV);
};
class MaxSizeWidgetDelegate : public views::WidgetDelegateView {
diff --git a/ash/wm/test_activation_delegate.h b/ash/wm/test_activation_delegate.h
index 4ab490e..1e2fdde 100644
--- a/ash/wm/test_activation_delegate.h
+++ b/ash/wm/test_activation_delegate.h
@@ -25,6 +25,9 @@
TestActivationDelegate();
explicit TestActivationDelegate(bool activate);
+ TestActivationDelegate(const TestActivationDelegate&) = delete;
+ TestActivationDelegate& operator=(const TestActivationDelegate&) = delete;
+
// Associates this delegate with a Window.
void SetWindow(aura::Window* window);
@@ -54,8 +57,6 @@
int activated_count_;
int lost_active_count_;
mutable int should_activate_count_;
-
- DISALLOW_COPY_AND_ASSIGN(TestActivationDelegate);
};
} // namespace ash
diff --git a/ash/wm/video_detector.h b/ash/wm/video_detector.h
index 542529a..ec46973 100644
--- a/ash/wm/video_detector.h
+++ b/ash/wm/video_detector.h
@@ -56,6 +56,10 @@
};
VideoDetector();
+
+ VideoDetector(const VideoDetector&) = delete;
+ VideoDetector& operator=(const VideoDetector&) = delete;
+
~VideoDetector() override;
State state() const { return state_; }
@@ -112,8 +116,6 @@
mojo::Receiver<viz::mojom::VideoDetectorObserver> receiver_{this};
base::WeakPtrFactory<VideoDetector> weak_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(VideoDetector);
};
} // namespace ash
diff --git a/ash/wm/video_detector_unittest.cc b/ash/wm/video_detector_unittest.cc
index de0f3cd4..08266a9e 100644
--- a/ash/wm/video_detector_unittest.cc
+++ b/ash/wm/video_detector_unittest.cc
@@ -30,6 +30,9 @@
public:
TestObserver() = default;
+ TestObserver(const TestObserver&) = delete;
+ TestObserver& operator=(const TestObserver&) = delete;
+
bool empty() const { return states_.empty(); }
void reset() { states_.clear(); }
@@ -49,8 +52,6 @@
private:
// States in the order they were received.
base::circular_deque<VideoDetector::State> states_;
-
- DISALLOW_COPY_AND_ASSIGN(TestObserver);
};
class VideoDetectorTest : public AshTestBase {
diff --git a/ash/wm/window_animations_unittest.cc b/ash/wm/window_animations_unittest.cc
index 6913032..b888a18 100644
--- a/ash/wm/window_animations_unittest.cc
+++ b/ash/wm/window_animations_unittest.cc
@@ -35,14 +35,14 @@
public:
WindowAnimationsTest() = default;
+ WindowAnimationsTest(const WindowAnimationsTest&) = delete;
+ WindowAnimationsTest& operator=(const WindowAnimationsTest&) = delete;
+
void SetUp() override {
base::CommandLine::ForCurrentProcess()->AppendSwitch(
keyboard::switches::kEnableVirtualKeyboard);
AshTestBase::SetUp();
}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(WindowAnimationsTest);
};
// Listens to animation scheduled notifications. Remembers the transition
@@ -55,6 +55,11 @@
// RemoveObserver is called when the first animation is scheduled and so
// there should be no need for now to remove it in destructor.
}
+
+ MinimizeAnimationObserver(const MinimizeAnimationObserver&) = delete;
+ MinimizeAnimationObserver& operator=(const MinimizeAnimationObserver&) =
+ delete;
+
base::TimeDelta duration() { return duration_; }
protected:
@@ -70,8 +75,6 @@
private:
ui::LayerAnimator* animator_;
base::TimeDelta duration_;
-
- DISALLOW_COPY_AND_ASSIGN(MinimizeAnimationObserver);
};
TEST_F(WindowAnimationsTest, HideShowBrightnessGrayscaleAnimation) {
diff --git a/ash/wm/window_dimmer.h b/ash/wm/window_dimmer.h
index a9a82489..10d7e70 100644
--- a/ash/wm/window_dimmer.h
+++ b/ash/wm/window_dimmer.h
@@ -53,6 +53,10 @@
explicit WindowDimmer(aura::Window* parent,
bool animate = true,
Delegate* delegate = nullptr);
+
+ WindowDimmer(const WindowDimmer&) = delete;
+ WindowDimmer& operator=(const WindowDimmer&) = delete;
+
~WindowDimmer() override;
aura::Window* parent() { return parent_; }
@@ -84,8 +88,6 @@
aura::Window* window_;
Delegate* delegate_; // Not owned.
-
- DISALLOW_COPY_AND_ASSIGN(WindowDimmer);
};
} // namespace ash
diff --git a/ash/wm/window_manager_unittest.cc b/ash/wm/window_manager_unittest.cc
index 1bf5269..dcd2ae2 100644
--- a/ash/wm/window_manager_unittest.cc
+++ b/ash/wm/window_manager_unittest.cc
@@ -103,10 +103,11 @@
public:
NonFocusableDelegate() = default;
+ NonFocusableDelegate(const NonFocusableDelegate&) = delete;
+ NonFocusableDelegate& operator=(const NonFocusableDelegate&) = delete;
+
private:
bool CanFocus() override { return false; }
-
- DISALLOW_COPY_AND_ASSIGN(NonFocusableDelegate);
};
class HitTestWindowDelegate : public aura::test::TestWindowDelegate {
diff --git a/ash/wm/workspace/multi_window_resize_controller.cc b/ash/wm/workspace/multi_window_resize_controller.cc
index 3f2b2b46..71f243bf 100644
--- a/ash/wm/workspace/multi_window_resize_controller.cc
+++ b/ash/wm/workspace/multi_window_resize_controller.cc
@@ -115,6 +115,9 @@
ResizeView(MultiWindowResizeController* controller, Direction direction)
: controller_(controller), direction_(direction) {}
+ ResizeView(const ResizeView&) = delete;
+ ResizeView& operator=(const ResizeView&) = delete;
+
// views::View overrides:
gfx::Size CalculatePreferredSize() const override {
const bool vert = direction_ == Direction::kLeftRight;
@@ -185,8 +188,6 @@
MultiWindowResizeController* controller_;
const Direction direction_;
-
- DISALLOW_COPY_AND_ASSIGN(ResizeView);
};
// MouseWatcherHost implementation for MultiWindowResizeController. Forwards
@@ -196,6 +197,9 @@
public:
ResizeMouseWatcherHost(MultiWindowResizeController* host) : host_(host) {}
+ ResizeMouseWatcherHost(const ResizeMouseWatcherHost&) = delete;
+ ResizeMouseWatcherHost& operator=(const ResizeMouseWatcherHost&) = delete;
+
// MouseWatcherHost overrides:
bool Contains(const gfx::Point& point_in_screen, EventType type) override {
return (type == EventType::kPress)
@@ -205,8 +209,6 @@
private:
MultiWindowResizeController* host_;
-
- DISALLOW_COPY_AND_ASSIGN(ResizeMouseWatcherHost);
};
MultiWindowResizeController::ResizeWindows::ResizeWindows()
diff --git a/ash/wm/workspace/workspace_layout_manager_unittest.cc b/ash/wm/workspace/workspace_layout_manager_unittest.cc
index 808beef..97a352c 100644
--- a/ash/wm/workspace/workspace_layout_manager_unittest.cc
+++ b/ash/wm/workspace/workspace_layout_manager_unittest.cc
@@ -360,6 +360,11 @@
public:
DontClobberRestoreBoundsWindowObserver() : window_(nullptr) {}
+ DontClobberRestoreBoundsWindowObserver(
+ const DontClobberRestoreBoundsWindowObserver&) = delete;
+ DontClobberRestoreBoundsWindowObserver& operator=(
+ const DontClobberRestoreBoundsWindowObserver&) = delete;
+
void set_window(aura::Window* window) { window_ = window; }
// aura::WindowObserver:
@@ -382,8 +387,6 @@
private:
aura::Window* window_;
-
- DISALLOW_COPY_AND_ASSIGN(DontClobberRestoreBoundsWindowObserver);
};
// Creates a window, maximized the window and from within the maximized
diff --git a/ash/wm/workspace_controller_unittest.cc b/ash/wm/workspace_controller_unittest.cc
index a9d24fc..659a8b5 100644
--- a/ash/wm/workspace_controller_unittest.cc
+++ b/ash/wm/workspace_controller_unittest.cc
@@ -586,6 +586,11 @@
public:
DontCrashOnChangeAndActivateDelegate() : window_(NULL) {}
+ DontCrashOnChangeAndActivateDelegate(
+ const DontCrashOnChangeAndActivateDelegate&) = delete;
+ DontCrashOnChangeAndActivateDelegate& operator=(
+ const DontCrashOnChangeAndActivateDelegate&) = delete;
+
void set_window(aura::Window* window) { window_ = window; }
// WindowDelegate overrides:
@@ -599,8 +604,6 @@
private:
aura::Window* window_;
-
- DISALLOW_COPY_AND_ASSIGN(DontCrashOnChangeAndActivateDelegate);
};
} // namespace