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/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
11 #include "ui/views/view.h" | 11 #include "ui/views/view.h" |
12 | 12 |
13 namespace views { | 13 namespace views { |
14 namespace examples { | 14 namespace examples { |
15 | 15 |
16 // 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. |
17 // 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. |
18 void LogStatus(const std::string& status); | 18 void LogStatus(const std::string& status); |
19 | 19 |
20 namespace { | 20 namespace { |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 void ExampleBase::PrintStatus(const char* format, ...) { | 60 void ExampleBase::PrintStatus(const char* format, ...) { |
61 va_list ap; | 61 va_list ap; |
62 va_start(ap, format); | 62 va_start(ap, format); |
63 std::string msg; | 63 std::string msg; |
64 base::StringAppendV(&msg, format, ap); | 64 base::StringAppendV(&msg, format, ap); |
65 LogStatus(msg); | 65 LogStatus(msg); |
66 } | 66 } |
67 | 67 |
68 } // namespace examples | 68 } // namespace examples |
69 } // namespace views | 69 } // namespace views |
OLD | NEW |