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

Unified Diff: ui/wayland/wayland_window.cc

Issue 10009024: Remove WAYLAND port (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync Created 8 years, 8 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/wayland/wayland_window.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/wayland/wayland_window.cc
diff --git a/ui/wayland/wayland_window.cc b/ui/wayland/wayland_window.cc
deleted file mode 100644
index cd84a450f628439f4c1fbe84b0fd615391013d42..0000000000000000000000000000000000000000
--- a/ui/wayland/wayland_window.cc
+++ /dev/null
@@ -1,86 +0,0 @@
-// Copyright (c) 2011 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/wayland/wayland_window.h"
-
-#include <wayland-egl.h>
-
-#include "base/wayland/wayland_event.h"
-#include "ui/wayland/wayland_display.h"
-#include "ui/wayland/wayland_widget.h"
-
-using base::wayland::WaylandEvent;
-
-namespace ui {
-
-WaylandWindow::WaylandWindow(WaylandWidget* widget, WaylandDisplay* display)
- : widget_(widget),
- display_(display),
- parent_window_(NULL),
- relative_position_(),
- surface_(display->CreateSurface()),
- fullscreen_(false) {
- wl_surface_set_user_data(surface_, this);
-}
-
-WaylandWindow::WaylandWindow(
- WaylandWidget* widget,
- WaylandDisplay* display,
- WaylandWindow* parent,
- int32_t x,
- int32_t y)
- : widget_(widget),
- display_(display),
- parent_window_(parent),
- relative_position_(x, y),
- surface_(display->CreateSurface()),
- fullscreen_(false) {
- wl_surface_set_user_data(surface_, this);
-}
-
-WaylandWindow::~WaylandWindow() {
- if (surface_)
- wl_surface_destroy(surface_);
-}
-
-void WaylandWindow::SetVisible(bool visible) {
- if (visible) {
- if (fullscreen_) {
- wl_shell_set_fullscreen(display_->shell(), surface_);
- } else if (!parent_window_) {
- wl_shell_set_toplevel(display_->shell(), surface_);
- } else {
- wl_shell_set_transient(display_->shell(),
- surface_,
- parent_window_->surface(),
- relative_position_.x(),
- relative_position_.y(),
- 0);
- }
- } else {
- // TODO(dnicoara) What is the correct way of hiding a wl_surface?
- }
-}
-
-bool WaylandWindow::IsVisible() const {
- return surface_ != NULL;
-}
-
-void WaylandWindow::Configure(uint32_t time,
- uint32_t edges,
- int32_t x,
- int32_t y,
- int32_t width,
- int32_t height) {
- WaylandEvent event;
- event.geometry_change.time = time;
- event.geometry_change.x = x;
- event.geometry_change.y = y;
- event.geometry_change.width = width;
- event.geometry_change.height = height;
-
- widget_->OnGeometryChange(event);
-}
-
-} // namespace ui
« no previous file with comments | « ui/wayland/wayland_window.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698