| Index: components/bubble/bubble_manager.h
|
| diff --git a/components/bubble/bubble_manager.h b/components/bubble/bubble_manager.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..06255d1bdf66a59615c3b75ff027d81ee64891a2
|
| --- /dev/null
|
| +++ b/components/bubble/bubble_manager.h
|
| @@ -0,0 +1,38 @@
|
| +// Copyright 2015 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef COMPONENTS_BUBBLE_BUBBLE_MANAGER_H__
|
| +#define COMPONENTS_BUBBLE_BUBBLE_MANAGER_H__
|
| +
|
| +#include "base/memory/scoped_vector.h"
|
| +#include "components/bubble/bubble_controller.h"
|
| +
|
| +class BubbleDelegate;
|
| +
|
| +/**
|
| + * BubbleManager should exist per profile.
|
| + * Showing bubbles should go through the BubbleManager.
|
| + */
|
| +class BubbleManager {
|
| + public:
|
| + explicit BubbleManager();
|
| + virtual ~BubbleManager();
|
| +
|
| + void ShowBubble(BubbleDelegate* bubble);
|
| + void HideBubble(BubbleDelegate* bubble);
|
| + bool IsBubbleVisible(BubbleDelegate* bubble);
|
| +
|
| + // TODO(hcarmona): remove this.
|
| + void UpdateBubblePosition(BubbleDelegate* bubble);
|
| +
|
| + private:
|
| + // Only the BubbleController should call NotifyBubbleHidden.
|
| + friend class BubbleController;
|
| + void NotifyBubbleHidden(BubbleController* controller,
|
| + BubbleCloseReason reason);
|
| +
|
| + ScopedVector<BubbleController> controllers_;
|
| +};
|
| +
|
| +#endif // COMPONENTS_BUBBLE_BUBBLE_MANAGER_H__
|
|
|