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

Unified Diff: ui/views/widget/window_manager.cc

Issue 8547015: Revert 110949 - views: Move widget/ directory to ui/views. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 1 month 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/widget/window_manager.h ('k') | ui/views/window/client_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/widget/window_manager.cc
===================================================================
--- ui/views/widget/window_manager.cc (revision 110952)
+++ ui/views/widget/window_manager.cc (working copy)
@@ -1,100 +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/views/widget/window_manager.h"
-
-#include "base/compiler_specific.h"
-#include "ui/views/events/event.h"
-#include "ui/views/widget/widget.h"
-
-namespace {
-
-views::WindowManager* window_manager = NULL;
-
-class NullWindowManager : public views::WindowManager {
- public:
- NullWindowManager() : mouse_capture_(NULL) {
- }
-
- virtual void StartMoveDrag(views::Widget* widget,
- const gfx::Point& screen_point) OVERRIDE {
- NOTIMPLEMENTED();
- }
-
- virtual void StartResizeDrag(views::Widget* widget,
- const gfx::Point& screen_point,
- int hittest_code) OVERRIDE {
- NOTIMPLEMENTED();
- }
-
- virtual bool SetMouseCapture(views::Widget* widget) OVERRIDE {
- if (mouse_capture_ == widget)
- return true;
- if (mouse_capture_)
- return false;
- mouse_capture_ = widget;
- return true;
- }
-
- virtual bool ReleaseMouseCapture(views::Widget* widget) OVERRIDE {
- if (widget && mouse_capture_ != widget)
- return false;
- mouse_capture_ = NULL;
- return true;
- }
-
- virtual bool HasMouseCapture(const views::Widget* widget) const OVERRIDE {
- return mouse_capture_ == widget;
- }
-
- virtual bool HandleKeyEvent(views::Widget* widget,
- const views::KeyEvent& event) OVERRIDE {
- return false;
- }
-
- virtual bool HandleMouseEvent(views::Widget* widget,
- const views::MouseEvent& event) OVERRIDE {
- if (mouse_capture_) {
- views::MouseEvent translated(event, widget->GetRootView(),
- mouse_capture_->GetRootView());
- mouse_capture_->OnMouseEvent(translated);
- return true;
- }
- return false;
- }
-
- virtual ui::TouchStatus HandleTouchEvent(views::Widget* widget,
- const views::TouchEvent& event) OVERRIDE {
- return ui::TOUCH_STATUS_UNKNOWN;
- }
-
- void Register(views::Widget* widget) OVERRIDE {}
-
- private:
- views::Widget* mouse_capture_;
-};
-
-} // namespace
-
-namespace views {
-
-WindowManager::WindowManager() {
-}
-
-WindowManager::~WindowManager() {
-}
-
-// static
-void WindowManager::Install(WindowManager* wm) {
- window_manager = wm;
-}
-
-// static
-WindowManager* WindowManager::Get() {
- if (!window_manager)
- window_manager = new NullWindowManager();
- return window_manager;
-}
-
-} // namespace views
« no previous file with comments | « ui/views/widget/window_manager.h ('k') | ui/views/window/client_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698