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