Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(15)

Unified Diff: ui/views/examples/example_base.cc

Issue 851853002: It is time. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Trying to reup because the last upload failed. Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/examples/example_base.h ('k') | ui/views/examples/example_combobox_model.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/examples/example_base.cc
diff --git a/ui/views/examples/example_base.cc b/ui/views/examples/example_base.cc
deleted file mode 100644
index bb216f99425a9d2c5a6d44fa7f9b37c40041d5df..0000000000000000000000000000000000000000
--- a/ui/views/examples/example_base.cc
+++ /dev/null
@@ -1,68 +0,0 @@
-// Copyright (c) 2012 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.
-
-#include "ui/views/examples/example_base.h"
-
-#include <stdarg.h>
-
-#include "base/strings/stringprintf.h"
-#include "ui/views/view.h"
-
-namespace views {
-namespace examples {
-
-// Logs the specified string to the status area of the examples window.
-// This function can only be called if there is a visible examples window.
-void LogStatus(const std::string& status);
-
-namespace {
-
-// TODO(oshima): Check if this special container is still necessary.
-class ContainerView : public View {
- public:
- explicit ContainerView(ExampleBase* base)
- : example_view_created_(false),
- example_base_(base) {
- }
-
- private:
- // View:
- virtual void ViewHierarchyChanged(
- const ViewHierarchyChangedDetails& details) override {
- View::ViewHierarchyChanged(details);
- // We're not using child == this because a Widget may not be
- // available when this is added to the hierarchy.
- if (details.is_add && GetWidget() && !example_view_created_) {
- example_view_created_ = true;
- example_base_->CreateExampleView(this);
- }
- }
-
- // True if the example view has already been created, or false otherwise.
- bool example_view_created_;
-
- ExampleBase* example_base_;
-
- DISALLOW_COPY_AND_ASSIGN(ContainerView);
-};
-
-} // namespace
-
-ExampleBase::~ExampleBase() {}
-
-ExampleBase::ExampleBase(const char* title) : example_title_(title) {
- container_ = new ContainerView(this);
-}
-
-// Prints a message in the status area, at the bottom of the window.
-void ExampleBase::PrintStatus(const char* format, ...) {
- va_list ap;
- va_start(ap, format);
- std::string msg;
- base::StringAppendV(&msg, format, ap);
- LogStatus(msg);
-}
-
-} // namespace examples
-} // namespace views
« no previous file with comments | « ui/views/examples/example_base.h ('k') | ui/views/examples/example_combobox_model.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698