15821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Copyright (c) 2012 The Chromium Authors. All rights reserved. 25821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Use of this source code is governed by a BSD-style license that can be 35821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// found in the LICENSE file. 45821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 55821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#ifndef UI_VIEWS_WIDGET_ROOT_VIEW_H_ 65821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#define UI_VIEWS_WIDGET_ROOT_VIEW_H_ 75821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 85821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#include <string> 95821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 105821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#include "base/memory/ref_counted.h" 112a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)#include "ui/base/events/event_dispatcher.h" 125821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#include "ui/views/focus/focus_manager.h" 135821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#include "ui/views/focus/focus_search.h" 145821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#include "ui/views/view.h" 155821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 165821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)namespace views { 175821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 18a36e5920737c6adbddd3e43b760e5de8431db6e0Torne (Richard Coles)namespace test { 19a36e5920737c6adbddd3e43b760e5de8431db6e0Torne (Richard Coles)class WidgetTest; 20a36e5920737c6adbddd3e43b760e5de8431db6e0Torne (Richard Coles)} 21a36e5920737c6adbddd3e43b760e5de8431db6e0Torne (Richard Coles) 225821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)class Widget; 235821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 245821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// This is a views-internal API and should not be used externally. 255821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Widget exposes this object as a View*. 265821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)namespace internal { 275821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 285821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)//////////////////////////////////////////////////////////////////////////////// 295821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// RootView class 305821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// 315821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// The RootView is the root of a View hierarchy. A RootView is attached to a 325821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Widget. The Widget is responsible for receiving events from the host 335821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// environment, converting them to views-compatible events and then forwarding 345821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// them to the RootView for propagation into the View hierarchy. 355821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// 365821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// A RootView can have only one child, called its "Contents View" which is 375821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// sized to fill the bounds of the RootView (and hence the client area of the 385821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Widget). Call SetContentsView() after the associated Widget has been 395821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// initialized to attach the contents view to the RootView. 405821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// TODO(beng): Enforce no other callers to AddChildView/tree functions by 415821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// overriding those methods as private here. 425821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// TODO(beng): Clean up API further, make Widget a friend. 435821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// TODO(sky): We don't really want to export this class. 445821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// 452a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)class VIEWS_EXPORT RootView : public View, 462a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) public FocusTraversable, 472a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) public ui::EventDispatcherDelegate { 485821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) public: 495821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) static const char kViewClassName[]; 505821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 515821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // Creation and lifetime ----------------------------------------------------- 525821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) explicit RootView(Widget* widget); 535821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) virtual ~RootView(); 545821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 555821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // Tree operations ----------------------------------------------------------- 565821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 575821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // Sets the "contents view" of the RootView. This is the single child view 585821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // that is responsible for laying out the contents of the widget. 595821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) void SetContentsView(View* contents_view); 605821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) View* GetContentsView(); 615821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 625821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // Called when parent of the host changed. 635821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) void NotifyNativeViewHierarchyChanged(bool attached, 645821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) gfx::NativeView native_view); 655821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 665821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // Input --------------------------------------------------------------------- 675821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 685821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // Process a key event. Send the event to the focused view and up the focus 695821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // path, and finally to the default keyboard handler, until someone consumes 705821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // it. Returns whether anyone consumed the event. 712a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) void DispatchKeyEvent(ui::KeyEvent* event); 722a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) void DispatchScrollEvent(ui::ScrollEvent* event); 732a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) void DispatchTouchEvent(ui::TouchEvent* event); 742a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) virtual void DispatchGestureEvent(ui::GestureEvent* event); 755821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 765821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // Focus --------------------------------------------------------------------- 775821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 785821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // Used to set the FocusTraversable parent after the view has been created 795821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // (typically when the hierarchy changes and this RootView is added/removed). 805821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) virtual void SetFocusTraversableParent(FocusTraversable* focus_traversable); 815821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 825821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // Used to set the View parent after the view has been created. 835821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) virtual void SetFocusTraversableParentView(View* view); 845821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 855821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // System events ------------------------------------------------------------- 865821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 875821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // Public API for broadcasting theme change notifications to this View 885821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // hierarchy. 895821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) void ThemeChanged(); 905821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 915821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // Public API for broadcasting locale change notifications to this View 925821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // hierarchy. 935821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) void LocaleChanged(); 945821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 955821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // Overridden from FocusTraversable: 965821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) virtual FocusSearch* GetFocusSearch() OVERRIDE; 975821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) virtual FocusTraversable* GetFocusTraversableParent() OVERRIDE; 985821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) virtual View* GetFocusTraversableParentView() OVERRIDE; 995821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 1005821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // Overridden from View: 1015821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) virtual const Widget* GetWidget() const OVERRIDE; 1025821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) virtual Widget* GetWidget() OVERRIDE; 1035821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) virtual bool IsDrawn() const OVERRIDE; 104b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles) virtual const char* GetClassName() const OVERRIDE; 1055821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) virtual void SchedulePaintInRect(const gfx::Rect& rect) OVERRIDE; 1065821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE; 1075821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) virtual bool OnMouseDragged(const ui::MouseEvent& event) OVERRIDE; 1085821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) virtual void OnMouseReleased(const ui::MouseEvent& event) OVERRIDE; 1095821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) virtual void OnMouseCaptureLost() OVERRIDE; 1105821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) virtual void OnMouseMoved(const ui::MouseEvent& event) OVERRIDE; 1115821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) virtual void OnMouseExited(const ui::MouseEvent& event) OVERRIDE; 1125821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) virtual bool OnMouseWheel(const ui::MouseWheelEvent& event) OVERRIDE; 1135821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) virtual void SetMouseHandler(View* new_mouse_handler) OVERRIDE; 1145821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; 11590dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles) virtual void UpdateParentLayer() OVERRIDE; 1165821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 1175821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) protected: 1185821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // Overridden from View: 119a93a17c8d99d686bd4a1511e5504e5e6cc9fcadfTorne (Richard Coles) virtual void ViewHierarchyChanged( 120a93a17c8d99d686bd4a1511e5504e5e6cc9fcadfTorne (Richard Coles) const ViewHierarchyChangedDetails& details) OVERRIDE; 121a36e5920737c6adbddd3e43b760e5de8431db6e0Torne (Richard Coles) virtual void VisibilityChanged(View* starting_from, bool is_visible) OVERRIDE; 1225821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; 1232a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) virtual gfx::Vector2d CalculateOffsetToAncestorWithLayer( 1245821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) ui::Layer** layer_parent) OVERRIDE; 1252a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) virtual View::DragInfo* GetDragInfo() OVERRIDE; 1265821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 1275821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) private: 12890dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles) friend class ::views::View; 12990dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles) friend class ::views::Widget; 130a36e5920737c6adbddd3e43b760e5de8431db6e0Torne (Richard Coles) friend class ::views::test::WidgetTest; 1315821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 1325821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // Input --------------------------------------------------------------------- 1335821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 1345821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // Update the cursor given a mouse event. This is called by non mouse_move 1355821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // event handlers to honor the cursor desired by views located under the 1365821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // cursor during drag operations. The location of the mouse should be in the 1375821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // current coordinate system (i.e. any necessary transformation should be 1385821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // applied to the point prior to calling this). 1395821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) void UpdateCursor(const ui::MouseEvent& event); 1405821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 1415821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // Updates the last_mouse_* fields from e. The location of the mouse should be 1425821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // in the current coordinate system (i.e. any necessary transformation should 1435821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // be applied to the point prior to calling this). 1445821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) void SetMouseLocationAndFlags(const ui::MouseEvent& event); 1455821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 1462a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) void DispatchEventToTarget(View* target, ui::Event* event); 1472a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) 1482a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) // |view| is the view receiving |event|. This function sends the event to all 1492a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) // the Views up the hierarchy that has |notify_enter_exit_on_child_| flag 1502a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) // turned on, but does not contain |sibling|. 1512a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) void NotifyEnterExitOfDescendant(const ui::MouseEvent& event, 1522a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) ui::EventType type, 1532a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) View* view, 1542a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) View* sibling); 1552a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) 1562a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) // Overridden from ui::EventDispatcherDelegate: 1572a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) virtual bool CanDispatchToTarget(ui::EventTarget* target) OVERRIDE; 1582a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) 1595821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) ////////////////////////////////////////////////////////////////////////////// 1605821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 1615821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // Tree operations ----------------------------------------------------------- 1625821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 1635821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // The host Widget 1645821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) Widget* widget_; 1655821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 1665821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // Input --------------------------------------------------------------------- 1675821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 1685821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // The view currently handing down - drag - up 1695821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) View* mouse_pressed_handler_; 1705821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 1715821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // The view currently handling enter / exit 1725821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) View* mouse_move_handler_; 1735821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 1745821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // The last view to handle a mouse click, so that we can determine if 1755821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // a double-click lands on the same view as its single-click part. 1765821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) View* last_click_handler_; 1775821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 1785821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // true if mouse_pressed_handler_ has been explicitly set 1795821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) bool explicit_mouse_handler_; 1805821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 1815821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // Last position/flag of a mouse press/drag. Used if capture stops and we need 1825821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // to synthesize a release. 1835821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) int last_mouse_event_flags_; 1845821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) int last_mouse_event_x_; 1855821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) int last_mouse_event_y_; 1865821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 1875821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // The view currently handling touch events. 1885821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) View* touch_pressed_handler_; 1895821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 1905821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // The view currently handling gesture events. When set, this handler receives 1915821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // all gesture events, except when there is an event handler for the specific 1925821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // gesture (e.g. scroll). 1935821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) View* gesture_handler_; 1945821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 1955821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // The view currently handling scroll gesture events. 1965821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) View* scroll_gesture_handler_; 1975821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 1985821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // Focus --------------------------------------------------------------------- 1995821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 2005821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // The focus search algorithm. 2015821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) FocusSearch focus_search_; 2025821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 2035821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // Whether this root view belongs to the current active window. 2045821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // bool activated_; 2055821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 2065821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // The parent FocusTraversable, used for focus traversal. 2075821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) FocusTraversable* focus_traversable_parent_; 2085821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 2095821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // The View that contains this RootView. This is used when we have RootView 2105821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // wrapped inside native components, and is used for the focus traversal. 2115821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) View* focus_traversable_parent_view_; 2125821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 2132a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) View* event_dispatch_target_; 2142a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) 2155821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // Drag and drop ------------------------------------------------------------- 2165821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 2175821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // Tracks drag state for a view. 2185821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) View::DragInfo drag_info_; 2195821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 2205821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) DISALLOW_IMPLICIT_CONSTRUCTORS(RootView); 2215821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)}; 2225821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 2235821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)} // namespace internal 2245821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)} // namespace views 2255821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 2265821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#endif // UI_VIEWS_WIDGET_ROOT_VIEW_H_ 227