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

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

Issue 1323133002: Pass a BubbleReference to BubbleUI::Show. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: bubbleReference -> bubble_reference Created 5 years, 3 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_controller.cc ('k') | components/bubble/bubble_manager_unittest.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 "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/memory/scoped_vector.h" 9 #include "base/memory/scoped_vector.h"
10 #include "base/memory/weak_ptr.h"
11 #include "base/threading/thread_checker.h" 10 #include "base/threading/thread_checker.h"
12 #include "components/bubble/bubble_close_reason.h" 11 #include "components/bubble/bubble_close_reason.h"
12 #include "components/bubble/bubble_reference.h"
13 13
14 class BubbleController;
15 class BubbleDelegate; 14 class BubbleDelegate;
16 15
17 typedef base::WeakPtr<BubbleController> BubbleReference;
18
19 // Inherit from BubbleManager to show, update, and close bubbles. 16 // Inherit from BubbleManager to show, update, and close bubbles.
20 // Any class that inherits from BubbleManager should capture any events that 17 // Any class that inherits from BubbleManager should capture any events that
21 // should dismiss a bubble or update its anchor point. 18 // should dismiss a bubble or update its anchor point.
22 // This class assumes that we won't be showing a lot of bubbles simultaneously. 19 // This class assumes that we won't be showing a lot of bubbles simultaneously.
23 // TODO(hcarmona): Handle simultaneous bubbles. http://crbug.com/366937 20 // TODO(hcarmona): Handle simultaneous bubbles. http://crbug.com/366937
24 class BubbleManager { 21 class BubbleManager {
25 public: 22 public:
26 // Should be instantiated on the UI thread. 23 // Should be instantiated on the UI thread.
27 BubbleManager(); 24 BubbleManager();
28 virtual ~BubbleManager(); 25 virtual ~BubbleManager();
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 // The bubbles that are being managed. 57 // The bubbles that are being managed.
61 ScopedVector<BubbleController> controllers_; 58 ScopedVector<BubbleController> controllers_;
62 59
63 // The bubbles queued to be shown when possible. 60 // The bubbles queued to be shown when possible.
64 ScopedVector<BubbleController> show_queue_; 61 ScopedVector<BubbleController> show_queue_;
65 62
66 DISALLOW_COPY_AND_ASSIGN(BubbleManager); 63 DISALLOW_COPY_AND_ASSIGN(BubbleManager);
67 }; 64 };
68 65
69 #endif // COMPONENTS_BUBBLE_BUBBLE_MANAGER_H_ 66 #endif // COMPONENTS_BUBBLE_BUBBLE_MANAGER_H_
OLDNEW
« no previous file with comments | « components/bubble/bubble_controller.cc ('k') | components/bubble/bubble_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698