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

Side by Side Diff: components/bubble/bubble_manager.h

Issue 1921973002: Convert //components/[a-e]* from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 8 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 | « components/bubble/bubble_delegate.h ('k') | components/bubble/bubble_manager.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 COMPONENTS_BUBBLE_BUBBLE_MANAGER_H_ 5 #ifndef COMPONENTS_BUBBLE_BUBBLE_MANAGER_H_
6 #define COMPONENTS_BUBBLE_BUBBLE_MANAGER_H_ 6 #define COMPONENTS_BUBBLE_BUBBLE_MANAGER_H_
7 7
8 #include <memory>
9
8 #include "base/macros.h" 10 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "base/memory/scoped_vector.h" 11 #include "base/memory/scoped_vector.h"
11 #include "base/observer_list.h" 12 #include "base/observer_list.h"
12 #include "base/threading/thread_checker.h" 13 #include "base/threading/thread_checker.h"
13 #include "components/bubble/bubble_close_reason.h" 14 #include "components/bubble/bubble_close_reason.h"
14 #include "components/bubble/bubble_reference.h" 15 #include "components/bubble/bubble_reference.h"
15 16
16 class BubbleDelegate; 17 class BubbleDelegate;
17 18
18 namespace content { 19 namespace content {
19 class RenderFrameHost; 20 class RenderFrameHost;
(...skipping 24 matching lines...) Expand all
44 private: 45 private:
45 DISALLOW_COPY_AND_ASSIGN(BubbleManagerObserver); 46 DISALLOW_COPY_AND_ASSIGN(BubbleManagerObserver);
46 }; 47 };
47 48
48 // Should be instantiated on the UI thread. 49 // Should be instantiated on the UI thread.
49 BubbleManager(); 50 BubbleManager();
50 virtual ~BubbleManager(); 51 virtual ~BubbleManager();
51 52
52 // Shows a specific bubble and returns a reference to it. 53 // Shows a specific bubble and returns a reference to it.
53 // This reference should be used through the BubbleManager. 54 // This reference should be used through the BubbleManager.
54 BubbleReference ShowBubble(scoped_ptr<BubbleDelegate> bubble); 55 BubbleReference ShowBubble(std::unique_ptr<BubbleDelegate> bubble);
55 56
56 // Notify a bubble of an event that might trigger close. 57 // Notify a bubble of an event that might trigger close.
57 // Returns true if the bubble was actually closed. 58 // Returns true if the bubble was actually closed.
58 bool CloseBubble(BubbleReference bubble, BubbleCloseReason reason); 59 bool CloseBubble(BubbleReference bubble, BubbleCloseReason reason);
59 60
60 // Notify all bubbles of an event that might trigger close. 61 // Notify all bubbles of an event that might trigger close.
61 void CloseAllBubbles(BubbleCloseReason reason); 62 void CloseAllBubbles(BubbleCloseReason reason);
62 63
63 // Notify all bubbles that their anchor or parent may have changed. 64 // Notify all bubbles that their anchor or parent may have changed.
64 void UpdateAllBubbleAnchors(); 65 void UpdateAllBubbleAnchors();
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 // Determines what happens to a bubble when |ShowBubble| is called. 101 // Determines what happens to a bubble when |ShowBubble| is called.
101 ManagerState manager_state_; 102 ManagerState manager_state_;
102 103
103 // The bubbles that are being managed. 104 // The bubbles that are being managed.
104 ScopedVector<BubbleController> controllers_; 105 ScopedVector<BubbleController> controllers_;
105 106
106 DISALLOW_COPY_AND_ASSIGN(BubbleManager); 107 DISALLOW_COPY_AND_ASSIGN(BubbleManager);
107 }; 108 };
108 109
109 #endif // COMPONENTS_BUBBLE_BUBBLE_MANAGER_H_ 110 #endif // COMPONENTS_BUBBLE_BUBBLE_MANAGER_H_
OLDNEW
« no previous file with comments | « components/bubble/bubble_delegate.h ('k') | components/bubble/bubble_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698