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

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: Add test. 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..2c1afc20ac6aaaec421a904be5f84eff3f6170d4 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
+// should be initially focused.
+class TestInitialFocusWidgetDelegate : public TestDesktopWidgetDelegate {
sky 2016/03/02 03:41:02 Why is this code in widget_tesT? AFAICT you don't
xdai1 2016/03/02 21:15:55 This class is also used by widget_interactive_uite
+ 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