Chromium Code Reviews| Index: components/bubble/bubble_delegate.h |
| diff --git a/components/bubble/bubble_delegate.h b/components/bubble/bubble_delegate.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..09e7f67538e90409f749e2739e008016fa4bbea8 |
| --- /dev/null |
| +++ b/components/bubble/bubble_delegate.h |
| @@ -0,0 +1,39 @@ |
| +// 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_DELEGATE_H_ |
| +#define COMPONENTS_BUBBLE_BUBBLE_DELEGATE_H_ |
| + |
| +#include "base/memory/scoped_ptr.h" |
| +#include "base/memory/weak_ptr.h" |
| + |
| +class BubbleUI; |
| + |
| +class BubbleDelegate { |
| + public: |
| + BubbleDelegate(); |
| + virtual ~BubbleDelegate(); |
| + |
| + // Called to notify the delegate that it is closed. |
| + // This is different than hiding the bubble because the delegate will be |
| + // cleaned up after this call. |
| + virtual void Finalize() = 0; |
| + |
| + // Returning true here means that the bubble will not be shown again after it |
| + // is hidden. |
| + virtual bool CloseOnHide() = 0; |
| + |
| + // Build UI to represent this bubble. |
| + virtual scoped_ptr<BubbleUI> BuildBubbleUI() = 0; |
| + |
| + // Get the context for this bubble. This allows a bubble to be |
| + // hidden/closed/shown on the correct events. |
| + virtual void* GetContext() = 0; |
| + |
| + base::WeakPtrFactory<BubbleDelegate> weak_ptr_factory; |
|
please use gerrit instead
2015/08/07 23:02:27
class member variables need to have trailing _.
hcarmona
2015/08/11 02:35:46
Done.
|
| + |
| + DISALLOW_COPY_AND_ASSIGN(BubbleDelegate); |
|
please use gerrit instead
2015/08/07 23:02:27
This should be in private.
hcarmona
2015/08/11 02:35:46
Done.
|
| +}; |
| + |
| +#endif // COMPONENTS_BUBBLE_BUBBLE_DELEGATE_H_ |