OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 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 #include "views/examples/example_base.h" | 5 #include "ui/views/examples/example_base.h" |
6 | 6 |
7 #include <stdarg.h> | 7 #include <stdarg.h> |
8 | 8 |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/stringprintf.h" | 10 #include "base/stringprintf.h" |
11 #include "views/examples/examples_main.h" | 11 #include "ui/views/examples/examples_main.h" |
12 | 12 |
13 namespace { | 13 namespace { |
14 | 14 |
15 // Some of GTK based view classes require NativeWidgetGtk in the view | 15 // Some of GTK based view classes require NativeWidgetGtk in the view |
16 // parent chain. This class is used to defer the creation of such | 16 // parent chain. This class is used to defer the creation of such |
17 // views until a NativeWidgetGtk is added to the view hierarchy. | 17 // views until a NativeWidgetGtk is added to the view hierarchy. |
18 class ContainerView : public views::View { | 18 class ContainerView : public views::View { |
19 public: | 19 public: |
20 explicit ContainerView(examples::ExampleBase* base) | 20 explicit ContainerView(examples::ExampleBase* base) |
21 : example_view_created_(false), | 21 : example_view_created_(false), |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 // Prints a message in the status area, at the bottom of the window. | 58 // Prints a message in the status area, at the bottom of the window. |
59 void ExampleBase::PrintStatus(const char* format, ...) { | 59 void ExampleBase::PrintStatus(const char* format, ...) { |
60 va_list ap; | 60 va_list ap; |
61 va_start(ap, format); | 61 va_start(ap, format); |
62 std::string msg; | 62 std::string msg; |
63 base::StringAppendV(&msg, format, ap); | 63 base::StringAppendV(&msg, format, ap); |
64 main_->SetStatus(msg); | 64 main_->SetStatus(msg); |
65 } | 65 } |
66 | 66 |
67 } // namespace examples | 67 } // namespace examples |
OLD | NEW |