summaryrefslogtreecommitdiffstats
path: root/ui/views/focus_border.h
diff options
context:
space:
mode:
authorwittman@chromium.org <wittman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-03 22:33:19 +0000
committerwittman@chromium.org <wittman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-03 22:33:19 +0000
commit6a15176798f91b11225f08faee35917f9b856ea7 (patch)
treecbc7bee30327d063acca9215bdebfd6b672750d1 /ui/views/focus_border.h
parentc521d746d12a9ed38bd3941ffcefe39d39ca94ca (diff)
downloadchromium_src-6a15176798f91b11225f08faee35917f9b856ea7.zip
chromium_src-6a15176798f91b11225f08faee35917f9b856ea7.tar.gz
chromium_src-6a15176798f91b11225f08faee35917f9b856ea7.tar.bz2
This CL supersedes previous ConstrainedWindow Views CLs and contains much of the work required to update
ConstrainedWindowViews to meet the mock specified at: http://www.corp.google.com/~kenmoore/mocks/chromeos/Misc_2012/Dialogs/Markup2/dialogs_markup2g.html I believe that all the features of the mock are implemented by this CL, except: - dialog shadow - dialog animations - button shadows - some aspects of button text layout Note that this CL attempts to fully address *only* the repost form warning dialog. The intention is to complete the remaining work (features and dialogs) in future CLs. The ConstrainedWindow changes are behind a flag to allow for incremental progress. The first patch set contains changes to position the constrained window so that it overlaps the browser chrome. BUG=140517, 140537, 140539, 140554, 140562 Review URL: https://chromiumcodereview.appspot.com/10933085 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@159994 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/views/focus_border.h')
-rw-r--r--ui/views/focus_border.h49
1 files changed, 49 insertions, 0 deletions
diff --git a/ui/views/focus_border.h b/ui/views/focus_border.h
new file mode 100644
index 0000000..15a34778
--- /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_