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

Side by Side Diff: ui/views/widget/widget.h

Issue 686493002: Standardize usage of virtual/override/final specifiers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 unified diff | Download patch
« no previous file with comments | « ui/views/widget/tooltip_manager_aura.h ('k') | ui/views/widget/widget.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_VIEWS_WIDGET_WIDGET_H_ 5 #ifndef UI_VIEWS_WIDGET_WIDGET_H_
6 #define UI_VIEWS_WIDGET_WIDGET_H_ 6 #define UI_VIEWS_WIDGET_WIDGET_H_
7 7
8 #include <set> 8 #include <set>
9 #include <stack> 9 #include <stack>
10 #include <vector> 10 #include <vector>
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 bool force_show_in_taskbar; 254 bool force_show_in_taskbar;
255 // Only used by X11, for root level windows. Specifies the res_name and 255 // Only used by X11, for root level windows. Specifies the res_name and
256 // res_class fields, respectively, of the WM_CLASS window property. Controls 256 // res_class fields, respectively, of the WM_CLASS window property. Controls
257 // window grouping and desktop file matching in Linux window managers. 257 // window grouping and desktop file matching in Linux window managers.
258 std::string wm_role_name; 258 std::string wm_role_name;
259 std::string wm_class_name; 259 std::string wm_class_name;
260 std::string wm_class_class; 260 std::string wm_class_class;
261 }; 261 };
262 262
263 Widget(); 263 Widget();
264 virtual ~Widget(); 264 ~Widget() override;
265 265
266 // Creates a toplevel window with no context. These methods should only be 266 // Creates a toplevel window with no context. These methods should only be
267 // used in cases where there is no contextual information because we're 267 // used in cases where there is no contextual information because we're
268 // creating a toplevel window connected to no other event. 268 // creating a toplevel window connected to no other event.
269 // 269 //
270 // If you have any parenting or context information, or can pass that 270 // If you have any parenting or context information, or can pass that
271 // information, prefer the WithParent or WithContext versions of these 271 // information, prefer the WithParent or WithContext versions of these
272 // methods. 272 // methods.
273 static Widget* CreateWindow(WidgetDelegate* delegate); 273 static Widget* CreateWindow(WidgetDelegate* delegate);
274 static Widget* CreateWindowWithBounds(WidgetDelegate* delegate, 274 static Widget* CreateWindowWithBounds(WidgetDelegate* delegate,
(...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after
736 // Called when the delegate's CanResize or CanMaximize changes. 736 // Called when the delegate's CanResize or CanMaximize changes.
737 void OnSizeConstraintsChanged(); 737 void OnSizeConstraintsChanged();
738 738
739 // Notification that our owner is closing. 739 // Notification that our owner is closing.
740 // NOTE: this is not invoked for aura as it's currently not needed there. 740 // NOTE: this is not invoked for aura as it's currently not needed there.
741 // Under aura menus close by way of activation getting reset when the owner 741 // Under aura menus close by way of activation getting reset when the owner
742 // closes. 742 // closes.
743 virtual void OnOwnerClosing(); 743 virtual void OnOwnerClosing();
744 744
745 // Overridden from NativeWidgetDelegate: 745 // Overridden from NativeWidgetDelegate:
746 virtual bool IsModal() const override; 746 bool IsModal() const override;
747 virtual bool IsDialogBox() const override; 747 bool IsDialogBox() const override;
748 virtual bool CanActivate() const override; 748 bool CanActivate() const override;
749 virtual bool IsInactiveRenderingDisabled() const override; 749 bool IsInactiveRenderingDisabled() const override;
750 virtual void EnableInactiveRendering() override; 750 void EnableInactiveRendering() override;
751 virtual void OnNativeWidgetActivationChanged(bool active) override; 751 void OnNativeWidgetActivationChanged(bool active) override;
752 virtual void OnNativeFocus(gfx::NativeView old_focused_view) override; 752 void OnNativeFocus(gfx::NativeView old_focused_view) override;
753 virtual void OnNativeBlur(gfx::NativeView new_focused_view) override; 753 void OnNativeBlur(gfx::NativeView new_focused_view) override;
754 virtual void OnNativeWidgetVisibilityChanging(bool visible) override; 754 void OnNativeWidgetVisibilityChanging(bool visible) override;
755 virtual void OnNativeWidgetVisibilityChanged(bool visible) override; 755 void OnNativeWidgetVisibilityChanged(bool visible) override;
756 virtual void OnNativeWidgetCreated(bool desktop_widget) override; 756 void OnNativeWidgetCreated(bool desktop_widget) override;
757 virtual void OnNativeWidgetDestroying() override; 757 void OnNativeWidgetDestroying() override;
758 virtual void OnNativeWidgetDestroyed() override; 758 void OnNativeWidgetDestroyed() override;
759 virtual gfx::Size GetMinimumSize() const override; 759 gfx::Size GetMinimumSize() const override;
760 virtual gfx::Size GetMaximumSize() const override; 760 gfx::Size GetMaximumSize() const override;
761 virtual void OnNativeWidgetMove() override; 761 void OnNativeWidgetMove() override;
762 virtual void OnNativeWidgetSizeChanged(const gfx::Size& new_size) override; 762 void OnNativeWidgetSizeChanged(const gfx::Size& new_size) override;
763 virtual void OnNativeWidgetWindowShowStateChanged() override; 763 void OnNativeWidgetWindowShowStateChanged() override;
764 virtual void OnNativeWidgetBeginUserBoundsChange() override; 764 void OnNativeWidgetBeginUserBoundsChange() override;
765 virtual void OnNativeWidgetEndUserBoundsChange() override; 765 void OnNativeWidgetEndUserBoundsChange() override;
766 virtual bool HasFocusManager() const override; 766 bool HasFocusManager() const override;
767 virtual bool OnNativeWidgetPaintAccelerated( 767 bool OnNativeWidgetPaintAccelerated(const gfx::Rect& dirty_region) override;
768 const gfx::Rect& dirty_region) override; 768 void OnNativeWidgetPaint(gfx::Canvas* canvas) override;
769 virtual void OnNativeWidgetPaint(gfx::Canvas* canvas) override; 769 int GetNonClientComponent(const gfx::Point& point) override;
770 virtual int GetNonClientComponent(const gfx::Point& point) override; 770 void OnKeyEvent(ui::KeyEvent* event) override;
771 virtual void OnKeyEvent(ui::KeyEvent* event) override; 771 void OnMouseEvent(ui::MouseEvent* event) override;
772 virtual void OnMouseEvent(ui::MouseEvent* event) override; 772 void OnMouseCaptureLost() override;
773 virtual void OnMouseCaptureLost() override; 773 void OnScrollEvent(ui::ScrollEvent* event) override;
774 virtual void OnScrollEvent(ui::ScrollEvent* event) override; 774 void OnGestureEvent(ui::GestureEvent* event) override;
775 virtual void OnGestureEvent(ui::GestureEvent* event) override; 775 bool ExecuteCommand(int command_id) override;
776 virtual bool ExecuteCommand(int command_id) override; 776 InputMethod* GetInputMethodDirect() override;
777 virtual InputMethod* GetInputMethodDirect() override; 777 const std::vector<ui::Layer*>& GetRootLayers() override;
778 virtual const std::vector<ui::Layer*>& GetRootLayers() override; 778 bool HasHitTestMask() const override;
779 virtual bool HasHitTestMask() const override; 779 void GetHitTestMask(gfx::Path* mask) const override;
780 virtual void GetHitTestMask(gfx::Path* mask) const override; 780 Widget* AsWidget() override;
781 virtual Widget* AsWidget() override; 781 const Widget* AsWidget() const override;
782 virtual const Widget* AsWidget() const override; 782 bool SetInitialFocus(ui::WindowShowState show_state) override;
783 virtual bool SetInitialFocus(ui::WindowShowState show_state) override;
784 783
785 // Overridden from ui::EventSource: 784 // Overridden from ui::EventSource:
786 virtual ui::EventProcessor* GetEventProcessor() override; 785 ui::EventProcessor* GetEventProcessor() override;
787 786
788 // Overridden from FocusTraversable: 787 // Overridden from FocusTraversable:
789 virtual FocusSearch* GetFocusSearch() override; 788 FocusSearch* GetFocusSearch() override;
790 virtual FocusTraversable* GetFocusTraversableParent() override; 789 FocusTraversable* GetFocusTraversableParent() override;
791 virtual View* GetFocusTraversableParentView() override; 790 View* GetFocusTraversableParentView() override;
792 791
793 // Overridden from ui::NativeThemeObserver: 792 // Overridden from ui::NativeThemeObserver:
794 virtual void OnNativeThemeUpdated(ui::NativeTheme* observed_theme) override; 793 void OnNativeThemeUpdated(ui::NativeTheme* observed_theme) override;
795 794
796 protected: 795 protected:
797 // Creates the RootView to be used within this Widget. Subclasses may override 796 // Creates the RootView to be used within this Widget. Subclasses may override
798 // to create custom RootViews that do specialized event processing. 797 // to create custom RootViews that do specialized event processing.
799 // TODO(beng): Investigate whether or not this is needed. 798 // TODO(beng): Investigate whether or not this is needed.
800 virtual internal::RootView* CreateRootView(); 799 virtual internal::RootView* CreateRootView();
801 800
802 // Provided to allow the NativeWidget implementations to destroy the RootView 801 // Provided to allow the NativeWidget implementations to destroy the RootView
803 // _before_ the focus manager/tooltip manager. 802 // _before_ the focus manager/tooltip manager.
804 // TODO(beng): remove once we fold those objects onto this one. 803 // TODO(beng): remove once we fold those objects onto this one.
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
946 bool movement_disabled_; 945 bool movement_disabled_;
947 946
948 ScopedObserver<ui::NativeTheme, ui::NativeThemeObserver> observer_manager_; 947 ScopedObserver<ui::NativeTheme, ui::NativeThemeObserver> observer_manager_;
949 948
950 DISALLOW_COPY_AND_ASSIGN(Widget); 949 DISALLOW_COPY_AND_ASSIGN(Widget);
951 }; 950 };
952 951
953 } // namespace views 952 } // namespace views
954 953
955 #endif // UI_VIEWS_WIDGET_WIDGET_H_ 954 #endif // UI_VIEWS_WIDGET_WIDGET_H_
OLDNEW
« no previous file with comments | « ui/views/widget/tooltip_manager_aura.h ('k') | ui/views/widget/widget.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698