diff options
author | jcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-20 17:22:48 +0000 |
---|---|---|
committer | jcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-20 17:22:48 +0000 |
commit | e557d64b1d89a5acbe4b185e63c029c428bd217b (patch) | |
tree | adc254b279329bfae6f1a53cc19a03a3cade7a41 /views/examples/examples_main.h | |
parent | dd92c8dc5191650d37501f74bf017e4ad4f664a4 (diff) | |
download | chromium_src-e557d64b1d89a5acbe4b185e63c029c428bd217b.zip chromium_src-e557d64b1d89a5acbe4b185e63c029c428bd217b.tar.gz chromium_src-e557d64b1d89a5acbe4b185e63c029c428bd217b.tar.bz2 |
Porting the view examples to Windows.
Some refactoring done to the tests also.
See original review at:
http://codereview.chromium.org/295013/show
BUG=None
TEST=Make sure the view examples build and run on Windows
and Linux.
Review URL: http://codereview.chromium.org/294026
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29525 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/examples/examples_main.h')
-rw-r--r-- | views/examples/examples_main.h | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/views/examples/examples_main.h b/views/examples/examples_main.h new file mode 100644 index 0000000..c1d4a2b7 --- /dev/null +++ b/views/examples/examples_main.h @@ -0,0 +1,46 @@ +// Copyright (c) 2009 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 VIEWS_EXAMPLES_EXAMPLE_MAIN_H_ +#define VIEWS_EXAMPLES_EXAMPLE_MAIN_H_ + +#include <string> + +#include "base/basictypes.h" +#include "views/window/window_delegate.h" + +namespace views { +class Label; +class View; +} // namespace views + +namespace examples { + +// ExamplesMainBase creates all view examples and start event loop. +class ExamplesMain : public views::WindowDelegate { + public: + ExamplesMain() : contents_(NULL), status_label_(NULL) {} + virtual ~ExamplesMain() {} + + // views::WindowDelegate implementation: + virtual views::View* GetContentsView(); + + // Prints a message in the status area, at the bottom of the window. + void SetStatus(const std::wstring& status); + + // Creates all examples and runs the UI event loop. + void Run(); + + private: + views::View* contents_; + + views::Label* status_label_; + + DISALLOW_COPY_AND_ASSIGN(ExamplesMain); +}; + +} // namespace examples + +#endif // VIEWS_EXAMPLES_EXAMPLE_MAIN_H_ + |