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

Unified Diff: ui/views/widget/root_view.h

Issue 6286013: V2 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 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/widget/native_widget_win.cc ('k') | ui/views/widget/root_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/widget/root_view.h
===================================================================
--- ui/views/widget/root_view.h (revision 0)
+++ ui/views/widget/root_view.h (revision 0)
@@ -0,0 +1,62 @@
+// 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.
+
+#ifndef UI_VIEWS_WIDGET_ROOT_VIEW_H_
+#define UI_VIEWS_WIDGET_ROOT_VIEW_H_
+#pragma once
+
+#include "ui/views/view.h"
+
+namespace ui {
+namespace internal {
+
+////////////////////////////////////////////////////////////////////////////////
+// RootView class
+//
+// A View subclass that owns a View hierarchy. Used by the Widget to perform
+// View-specific event tracking.
+//
+class RootView : public View {
+ public:
+ RootView(Widget* widget, View* contents_view);
+ virtual ~RootView();
+
+ // Overridden from View:
+ virtual void OnViewRemoved(View* parent, View* child);
+ virtual bool OnKeyPressed(const KeyEvent& event);
+ virtual bool OnKeyReleased(const KeyEvent& event);
+ virtual bool OnMouseWheel(const MouseWheelEvent& event);
+ virtual bool OnMousePressed(const MouseEvent& event);
+ virtual bool OnMouseDragged(const MouseEvent& event);
+ virtual void OnMouseReleased(const MouseEvent& event);
+ virtual void OnMouseCaptureLost();
+ virtual void OnMouseMoved(const MouseEvent& event);
+ virtual void OnMouseExited(const MouseEvent& event);
+ virtual void Paint(gfx::Canvas* canvas);
+ virtual void InvalidateRect(const gfx::Rect& invalid_rect);
+ virtual Widget* GetWidget() const;
+
+ private:
+ Widget* widget_;
+
+ // The View that the mouse was pressed down on. Used to track drag operations
+ // and to target mouse-released events at the correct view.
+ View* mouse_pressed_handler_;
+
+ // The View that the mouse is currently over. Used to track mouse-exited
+ // events as the mouse moves from view to view, and when the mouse leaves the
+ // bounds of the containing Widget.
+ View* mouse_move_handler_;
+
+ // State captured on mouse press that would be useful for a potential drag
+ // operation.
+ DragInfo drag_info_;
+
+ DISALLOW_COPY_AND_ASSIGN(RootView);
+};
+
+} // namespace internal
+} // namespace ui
+
+#endif // UI_VIEWS_WIDGET_ROOT_VIEW_H_
Property changes on: ui\views\widget\root_view.h
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « ui/views/widget/native_widget_win.cc ('k') | ui/views/widget/root_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698