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

Unified Diff: ui/views/focus_border.h

Issue 10933085: Update ConstrainedWindowViews appearance according to mock (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Browser test fixes Created 8 years, 2 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/focus_border.h
diff --git a/ui/views/focus_border.h b/ui/views/focus_border.h
new file mode 100644
index 0000000000000000000000000000000000000000..15a3477883422e906470a992e5247b4988fc16c1
--- /dev/null
+++ b/ui/views/focus_border.h
@@ -0,0 +1,49 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef UI_VIEWS_FOCUS_BORDER_H_
+#define UI_VIEWS_FOCUS_BORDER_H_
+
+#include "ui/views/views_export.h"
+#include "base/basictypes.h"
+
+namespace gfx {
+class Canvas;
+}
+
+namespace views {
+class View;
+
+////////////////////////////////////////////////////////////////////////////////
+//
+// Focus border class.
+//
+// The focus border class is used to display an indication of focus on a view.
+// To set a focus border on a view, call SetFocusBorder on the view. Once set
+// on a view, the focus border is owned by the view.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+class VIEWS_EXPORT FocusBorder {
+ public:
+ virtual ~FocusBorder();
+
+ // Creates the default inset dashed line focus border.
+ static FocusBorder* CreateDashedFocusBorder();
+ static FocusBorder* CreateDashedFocusBorder(
+ int left, int top, int right, int bottom);
+
+ // Renders the focus border for the specified view.
+ virtual void Paint(const View& view, gfx::Canvas* canvas) const = 0;
+
+ protected:
+ FocusBorder();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(FocusBorder);
+};
+
+} // namespace views
+
+#endif // UI_VIEWS_FOCUS_BORDER_H_

Powered by Google App Engine
This is Rietveld 408576698