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

Unified Diff: ui/ozone/platform/caca/caca_connection.cc

Issue 387953004: ozone: caca: Convert to PlatformWindow (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase & nits Created 6 years, 5 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/ozone/platform/caca/caca_connection.h ('k') | ui/ozone/platform/caca/caca_event_factory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/ozone/platform/caca/caca_connection.cc
diff --git a/ui/ozone/platform/caca/caca_connection.cc b/ui/ozone/platform/caca/caca_connection.cc
deleted file mode 100644
index 2086257a85dbbcda548fc03e066d1c8c0973f1a8..0000000000000000000000000000000000000000
--- a/ui/ozone/platform/caca/caca_connection.cc
+++ /dev/null
@@ -1,57 +0,0 @@
-// Copyright 2014 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/ozone/platform/caca/caca_connection.h"
-
-#include "base/logging.h"
-
-namespace ui {
-
-namespace {
-
-// Size of initial cnavas (in characters).
-const int kDefaultCanvasWidth = 160;
-const int kDefaultCanvasHeight = 48;
-
-} // namespace
-
-CacaConnection::CacaConnection() {
-}
-
-CacaConnection::~CacaConnection() {
-}
-
-bool CacaConnection::Initialize() {
- if (display_)
- return true;
-
- canvas_.reset(caca_create_canvas(kDefaultCanvasWidth, kDefaultCanvasHeight));
- if (!canvas_) {
- PLOG(ERROR) << "failed to create libcaca canvas";
- return false;
- }
-
- display_.reset(caca_create_display(canvas_.get()));
- if (!display_) {
- PLOG(ERROR) << "failed to initialize libcaca display";
- return false;
- }
-
- caca_set_cursor(display_.get(), 1);
- caca_set_display_title(display_.get(), "Ozone Content Shell");
-
- UpdateDisplaySize();
-
- return true;
-}
-
-void CacaConnection::UpdateDisplaySize() {
- physical_size_.SetSize(caca_get_canvas_width(canvas_.get()),
- caca_get_canvas_height(canvas_.get()));
-
- bitmap_size_.SetSize(caca_get_display_width(display_.get()),
- caca_get_display_height(display_.get()));
-}
-
-} // namespace ui
« no previous file with comments | « ui/ozone/platform/caca/caca_connection.h ('k') | ui/ozone/platform/caca/caca_event_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698