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

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

Issue 2173033002: Make various views SetShape() methods take an unique_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits Created 4 years, 5 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 unified diff | Download patch
« no previous file with comments | « ui/views/widget/native_widget_private.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 <map> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 #include <set> 10 #include <set>
11 #include <stack>
12 #include <string> 11 #include <string>
13 #include <vector> 12 #include <vector>
14 13
15 #include "base/macros.h" 14 #include "base/macros.h"
16 #include "base/observer_list.h" 15 #include "base/observer_list.h"
17 #include "base/scoped_observer.h" 16 #include "base/scoped_observer.h"
18 #include "build/build_config.h" 17 #include "build/build_config.h"
19 #include "ui/base/ui_base_types.h" 18 #include "ui/base/ui_base_types.h"
20 #include "ui/events/event_source.h" 19 #include "ui/events/event_source.h"
21 #include "ui/gfx/geometry/rect.h" 20 #include "ui/gfx/geometry/rect.h"
(...skipping 30 matching lines...) Expand all
52 namespace ui { 51 namespace ui {
53 class Accelerator; 52 class Accelerator;
54 class Compositor; 53 class Compositor;
55 class DefaultThemeProvider; 54 class DefaultThemeProvider;
56 class InputMethod; 55 class InputMethod;
57 class Layer; 56 class Layer;
58 class NativeTheme; 57 class NativeTheme;
59 class OSExchangeData; 58 class OSExchangeData;
60 class ThemeProvider; 59 class ThemeProvider;
61 class Window; 60 class Window;
62 } 61 } // namespace ui
63 62
64 namespace views { 63 namespace views {
65 64
66 class DesktopWindowTreeHost; 65 class DesktopWindowTreeHost;
67 class NativeWidget; 66 class NativeWidget;
68 class NonClientFrameView; 67 class NonClientFrameView;
69 class TooltipManager; 68 class TooltipManager;
70 class View; 69 class View;
71 class WidgetDelegate; 70 class WidgetDelegate;
72 class WidgetObserver; 71 class WidgetObserver;
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 468
470 // Places the widget in front of the specified widget in z-order. 469 // Places the widget in front of the specified widget in z-order.
471 void StackAboveWidget(Widget* widget); 470 void StackAboveWidget(Widget* widget);
472 void StackAbove(gfx::NativeView native_view); 471 void StackAbove(gfx::NativeView native_view);
473 void StackAtTop(); 472 void StackAtTop();
474 473
475 // Places the widget below the specified NativeView. 474 // Places the widget below the specified NativeView.
476 void StackBelow(gfx::NativeView native_view); 475 void StackBelow(gfx::NativeView native_view);
477 476
478 // Sets a shape on the widget. Passing a NULL |shape| reverts the widget to 477 // Sets a shape on the widget. Passing a NULL |shape| reverts the widget to
479 // be rectangular. Takes ownership of |shape|. 478 // be rectangular.
480 void SetShape(SkRegion* shape); 479 void SetShape(std::unique_ptr<SkRegion> shape);
481 480
482 // Hides the widget then closes it after a return to the message loop. 481 // Hides the widget then closes it after a return to the message loop.
483 virtual void Close(); 482 virtual void Close();
484 483
485 // TODO(beng): Move off public API. 484 // TODO(beng): Move off public API.
486 // Closes the widget immediately. Compare to |Close|. This will destroy the 485 // Closes the widget immediately. Compare to |Close|. This will destroy the
487 // window handle associated with this Widget, so should not be called from 486 // window handle associated with this Widget, so should not be called from
488 // any code that expects it to be valid beyond this call. 487 // any code that expects it to be valid beyond this call.
489 void CloseNow(); 488 void CloseNow();
490 489
(...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after
976 bool movement_disabled_; 975 bool movement_disabled_;
977 976
978 ScopedObserver<ui::NativeTheme, ui::NativeThemeObserver> observer_manager_; 977 ScopedObserver<ui::NativeTheme, ui::NativeThemeObserver> observer_manager_;
979 978
980 DISALLOW_COPY_AND_ASSIGN(Widget); 979 DISALLOW_COPY_AND_ASSIGN(Widget);
981 }; 980 };
982 981
983 } // namespace views 982 } // namespace views
984 983
985 #endif // UI_VIEWS_WIDGET_WIDGET_H_ 984 #endif // UI_VIEWS_WIDGET_WIDGET_H_
OLDNEW
« no previous file with comments | « ui/views/widget/native_widget_private.h ('k') | ui/views/widget/widget.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698