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

Side by Side Diff: views/examples/double_split_view_example.h

Issue 7846010: Fixed crash when a SinglesplitView gets embdedded inside SingleSplitView (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 years, 3 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) 2011 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 VIEWS_EXAMPLES_DOUBLE_SPLIT_VIEW_EXAMPLE_H_
6 #define VIEWS_EXAMPLES_DOUBLE_SPLIT_VIEW_EXAMPLE_H_
7 #pragma once
8
9 #include "views/controls/single_split_view.h"
10 #include "views/examples/example_base.h"
11
12 namespace examples {
13
14 class DoubleSplitViewExample : public ExampleBase {
15 public:
16 explicit DoubleSplitViewExample(ExamplesMain* main);
17 virtual ~DoubleSplitViewExample();
18
19 // Overridden from ExampleBase:
20 virtual std::wstring GetExampleTitle();
sky 2011/09/08 14:27:11 OVERRIDE on both of these.
Gajen 2011/09/09 13:58:02 Done.
21 virtual void CreateExampleView(views::View* container);
22
23 private:
24 // DoubleSplitViews's content, which draws gradient color on background.
25 class SplittedView : public views::View {
tfarina 2011/09/08 20:39:45 Could you move this class to an unnamed namespace
Gajen 2011/09/09 13:58:02 Done.
26 public:
27 SplittedView();
28 virtual ~SplittedView();
29
30 void SetColor(SkColor from, SkColor to);
31
32 // Overridden from views::View:
33 virtual gfx::Size GetPreferredSize();
sky 2011/09/08 14:27:11 OVERRIDE on all of these.
Gajen 2011/09/09 13:58:02 Done.
34 virtual gfx::Size GetMinimumSize();
35 virtual void Layout();
36
37
sky 2011/09/08 14:27:11 remove this.
Gajen 2011/09/09 13:58:02 Done.
38 private:
39 DISALLOW_COPY_AND_ASSIGN(SplittedView);
40 };
41
42 // The SinleSplitViews to be embedded.
43 views::SingleSplitView* outer_single_split_view_;
44 views::SingleSplitView* inner_single_split_view_;
45
46 DISALLOW_COPY_AND_ASSIGN(DoubleSplitViewExample);
47 };
48
49 } // namespace examples
50
51 #endif // VIEWS_EXAMPLES_DOUBLE_SPLIT_VIEW_EXAMPLE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698