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

Side by Side Diff: ui/views/examples/example_base.h

Issue 138783002: Cleans up gyp file for views example and removes duplicate code (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix windows Created 6 years, 11 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
« no previous file with comments | « ui/views/examples/double_split_view_example.h ('k') | ui/views/examples/examples_main.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_VIEWS_EXAMPLES_EXAMPLE_BASE_H_ 5 #ifndef UI_VIEWS_EXAMPLES_EXAMPLE_BASE_H_
6 #define UI_VIEWS_EXAMPLES_EXAMPLE_BASE_H_ 6 #define UI_VIEWS_EXAMPLES_EXAMPLE_BASE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "ui/views/examples/views_examples_export.h"
11 12
12 namespace views { 13 namespace views {
13 class View; 14 class View;
14 15
15 namespace examples { 16 namespace examples {
16 17
17 class ExampleBase { 18 class VIEWS_EXAMPLES_EXPORT ExampleBase {
18 public: 19 public:
19 virtual ~ExampleBase(); 20 virtual ~ExampleBase();
20 21
21 // Sub-classes should creates and add the views to the given parent. 22 // Sub-classes should creates and add the views to the given parent.
22 virtual void CreateExampleView(View* parent) = 0; 23 virtual void CreateExampleView(View* parent) = 0;
23 24
24 const std::string& example_title() const { return example_title_; } 25 const std::string& example_title() const { return example_title_; }
25 View* example_view() { return container_; } 26 View* example_view() { return container_; }
26 27
27 protected: 28 protected:
(...skipping 16 matching lines...) Expand all
44 // The view that contains the views example. 45 // The view that contains the views example.
45 View* container_; 46 View* container_;
46 47
47 DISALLOW_COPY_AND_ASSIGN(ExampleBase); 48 DISALLOW_COPY_AND_ASSIGN(ExampleBase);
48 }; 49 };
49 50
50 } // namespace examples 51 } // namespace examples
51 } // namespace views 52 } // namespace views
52 53
53 #endif // UI_VIEWS_EXAMPLES_EXAMPLE_BASE_H_ 54 #endif // UI_VIEWS_EXAMPLES_EXAMPLE_BASE_H_
OLDNEW
« no previous file with comments | « ui/views/examples/double_split_view_example.h ('k') | ui/views/examples/examples_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698