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 "ui/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 "ui/views/examples/examples_window.h" | 11 #include "ui/views/examples/examples_window.h" |
12 #include "views/view.h" | 12 #include "ui/views/view.h" |
13 | 13 |
14 namespace views { | 14 namespace views { |
15 namespace examples { | 15 namespace examples { |
16 | 16 |
17 // Logs the specified string to the status area of the examples window. | 17 // Logs the specified string to the status area of the examples window. |
18 // This function can only be called if there is a visible examples window. | 18 // This function can only be called if there is a visible examples window. |
19 void LogStatus(const std::string& status); | 19 void LogStatus(const std::string& status); |
20 | 20 |
21 namespace { | 21 namespace { |
22 | 22 |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 void ExampleBase::PrintStatus(const char* format, ...) { | 64 void ExampleBase::PrintStatus(const char* format, ...) { |
65 va_list ap; | 65 va_list ap; |
66 va_start(ap, format); | 66 va_start(ap, format); |
67 std::string msg; | 67 std::string msg; |
68 base::StringAppendV(&msg, format, ap); | 68 base::StringAppendV(&msg, format, ap); |
69 LogStatus(msg); | 69 LogStatus(msg); |
70 } | 70 } |
71 | 71 |
72 } // namespace examples | 72 } // namespace examples |
73 } // namespace views | 73 } // namespace views |
OLD | NEW |