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

Side by Side Diff: chrome/browser/ui/views/options/options_group_view.h

Issue 6670011: Options: Remove the GTK and Views native options code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 9 years, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_UI_VIEWS_OPTIONS_OPTIONS_GROUP_VIEW_H__
6 #define CHROME_BROWSER_UI_VIEWS_OPTIONS_OPTIONS_GROUP_VIEW_H__
7 #pragma once
8
9 #include "views/view.h"
10
11 namespace views {
12 class Label;
13 class Separator;
14 };
15
16 ///////////////////////////////////////////////////////////////////////////////
17 // OptionsGroupView
18 //
19 // A helper View that gathers related options into groups with a title and
20 // optional description.
21 //
22 class OptionsGroupView : public views::View {
23 public:
24 OptionsGroupView(views::View* contents,
25 const std::wstring& title,
26 const std::wstring& description,
27 bool show_separator);
28 virtual ~OptionsGroupView();
29
30 // Sets the group as being highlighted to attract attention.
31 void SetHighlighted(bool highlighted);
32
33 // Retrieves the width of the ContentsView. Used to help size wrapping items.
34 int GetContentsWidth() const;
35
36 protected:
37 // views::View overrides:
38 virtual AccessibilityTypes::Role GetAccessibleRole();
39 virtual void OnPaint(gfx::Canvas* canvas);
40 virtual void ViewHierarchyChanged(bool is_add,
41 views::View* parent,
42 views::View* child);
43
44 private:
45 void Init();
46
47 views::View* contents_;
48 views::Label* title_label_;
49 views::Label* description_label_;
50 views::Separator* separator_;
51
52 // True if we should show a separator line below the contents of this
53 // section.
54 bool show_separator_;
55
56 // True if this section should have a highlighted treatment to draw the
57 // user's attention.
58 bool highlighted_;
59
60 DISALLOW_COPY_AND_ASSIGN(OptionsGroupView);
61 };
62
63 #endif // CHROME_BROWSER_UI_VIEWS_OPTIONS_OPTIONS_GROUP_VIEW_H__
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/options/managed_prefs_banner_view.cc ('k') | chrome/browser/ui/views/options/options_group_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698