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

Unified Diff: ui/ozone/platform/dri/dri_window.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/ozone/platform/dri/dri_window.h ('k') | ui/ozone/platform/dri/dri_window_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/ozone/platform/dri/dri_window.cc
diff --git a/ui/ozone/platform/dri/dri_window.cc b/ui/ozone/platform/dri/dri_window.cc
deleted file mode 100644
index cce1dd63de19aafb2bebb63379dcef613ce4faf5..0000000000000000000000000000000000000000
--- a/ui/ozone/platform/dri/dri_window.cc
+++ /dev/null
@@ -1,122 +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/dri/dri_window.h"
-
-#include "base/bind.h"
-#include "ui/events/event.h"
-#include "ui/events/ozone/evdev/event_factory_evdev.h"
-#include "ui/events/ozone/events_ozone.h"
-#include "ui/events/platform/platform_event_source.h"
-#include "ui/ozone/common/gpu/ozone_gpu_messages.h"
-#include "ui/ozone/platform/dri/dri_cursor.h"
-#include "ui/ozone/platform/dri/dri_gpu_platform_support_host.h"
-#include "ui/ozone/platform/dri/dri_window_manager.h"
-#include "ui/platform_window/platform_window_delegate.h"
-
-namespace ui {
-
-DriWindow::DriWindow(PlatformWindowDelegate* delegate,
- const gfx::Rect& bounds,
- DriGpuPlatformSupportHost* sender,
- EventFactoryEvdev* event_factory,
- DriWindowManager* window_manager)
- : delegate_(delegate),
- sender_(sender),
- event_factory_(event_factory),
- window_manager_(window_manager),
- bounds_(bounds),
- widget_(window_manager->NextAcceleratedWidget()) {
- window_manager_->AddWindow(widget_, this);
-}
-
-DriWindow::~DriWindow() {
- PlatformEventSource::GetInstance()->RemovePlatformEventDispatcher(this);
- window_manager_->RemoveWindow(widget_);
-
- sender_->RemoveChannelObserver(this);
- if (!sender_->IsConnected())
- return;
-
- sender_->Send(new OzoneGpuMsg_DestroyWindowDelegate(widget_));
-}
-
-void DriWindow::Initialize() {
- sender_->AddChannelObserver(this);
- delegate_->OnAcceleratedWidgetAvailable(widget_);
- PlatformEventSource::GetInstance()->AddPlatformEventDispatcher(this);
-}
-
-void DriWindow::Show() {}
-
-void DriWindow::Hide() {}
-
-void DriWindow::Close() {}
-
-void DriWindow::SetBounds(const gfx::Rect& bounds) {
- bounds_ = bounds;
- delegate_->OnBoundsChanged(bounds);
-
- if (!sender_->IsConnected())
- return;
-
- if (window_manager_->cursor()->GetCursorWindow() == widget_)
- window_manager_->cursor()->HideCursor();
-
- sender_->Send(new OzoneGpuMsg_WindowBoundsChanged(widget_, bounds));
-
- if (window_manager_->cursor()->GetCursorWindow() == widget_)
- window_manager_->cursor()->ShowCursor();
-}
-
-gfx::Rect DriWindow::GetBounds() {
- return bounds_;
-}
-
-void DriWindow::SetCapture() {}
-
-void DriWindow::ReleaseCapture() {}
-
-void DriWindow::ToggleFullscreen() {}
-
-void DriWindow::Maximize() {}
-
-void DriWindow::Minimize() {}
-
-void DriWindow::Restore() {}
-
-void DriWindow::SetCursor(PlatformCursor cursor) {
- window_manager_->cursor()->SetCursor(widget_, cursor);
-}
-
-void DriWindow::MoveCursorTo(const gfx::Point& location) {
- event_factory_->WarpCursorTo(widget_, location);
-}
-
-bool DriWindow::CanDispatchEvent(const PlatformEvent& ne) {
- DCHECK(ne);
- Event* event = static_cast<Event*>(ne);
- if (event->IsMouseEvent() || event->IsScrollEvent())
- return window_manager_->cursor()->GetCursorWindow() == widget_;
-
- return true;
-}
-
-uint32_t DriWindow::DispatchEvent(const PlatformEvent& native_event) {
- DispatchEventFromNativeUiEvent(
- native_event,
- base::Bind(&PlatformWindowDelegate::DispatchEvent,
- base::Unretained(delegate_)));
- return POST_DISPATCH_STOP_PROPAGATION;
-}
-
-void DriWindow::OnChannelEstablished() {
- sender_->Send(new OzoneGpuMsg_CreateWindowDelegate(widget_));
- sender_->Send(new OzoneGpuMsg_WindowBoundsChanged(widget_, bounds_));
-}
-
-void DriWindow::OnChannelDestroyed() {
-}
-
-} // namespace ui
« no previous file with comments | « ui/ozone/platform/dri/dri_window.h ('k') | ui/ozone/platform/dri/dri_window_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698