Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(709)

Unified Diff: ui/views/test/widget_test.h

Issue 1753473003: A window should not get activated or get input focus if it's behind the lock screen. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address sky@'s comment. Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ui/views/test/widget_test.h
diff --git a/ui/views/test/widget_test.h b/ui/views/test/widget_test.h
index 0eee5eeab5b7ee2c4b160dae4fd918bbd12ec553..3b7dfe1f73e95636a1a4564e5011a1176c787de8 100644
--- a/ui/views/test/widget_test.h
+++ b/ui/views/test/widget_test.h
@@ -151,6 +151,24 @@ class TestDesktopWidgetDelegate : public WidgetDelegate {
DISALLOW_COPY_AND_ASSIGN(TestDesktopWidgetDelegate);
};
+// Testing widget delegate that creates a widget with a single view, which is
+// the initially focused view.
+class TestInitialFocusWidgetDelegate : public TestDesktopWidgetDelegate {
+ public:
+ explicit TestInitialFocusWidgetDelegate(gfx::NativeWindow context);
+ ~TestInitialFocusWidgetDelegate() override;
+
+ View* view() { return view_; }
+
+ // WidgetDelegate override:
+ View* GetInitiallyFocusedView() override;
+
+ private:
+ View* view_;
+
+ DISALLOW_COPY_AND_ASSIGN(TestInitialFocusWidgetDelegate);
+};
+
} // namespace test
} // namespace views

Powered by Google App Engine
This is Rietveld 408576698