| Index: chrome/browser/ui/toolbar/test_toolbar_actions_bar_bubble_delegate.h
|
| diff --git a/chrome/browser/ui/toolbar/test_toolbar_actions_bar_bubble_delegate.h b/chrome/browser/ui/toolbar/test_toolbar_actions_bar_bubble_delegate.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..8f89c0877bad59c0bbe7f4d32dace250c331d5f0
|
| --- /dev/null
|
| +++ b/chrome/browser/ui/toolbar/test_toolbar_actions_bar_bubble_delegate.h
|
| @@ -0,0 +1,57 @@
|
| +// 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 CHROME_BROWSER_UI_TOOLBAR_TEST_TOOLBAR_ACTIONS_BAR_BUBBLE_DELEGATE_H_
|
| +#define CHROME_BROWSER_UI_TOOLBAR_TEST_TOOLBAR_ACTIONS_BAR_BUBBLE_DELEGATE_H_
|
| +
|
| +#include "base/macros.h"
|
| +#include "base/memory/scoped_ptr.h"
|
| +#include "chrome/browser/ui/toolbar/toolbar_actions_bar_bubble_delegate.h"
|
| +
|
| +// A test delegate for a bubble to hang off the toolbar actions bar.
|
| +class TestToolbarActionsBarBubbleDelegate {
|
| + public:
|
| + TestToolbarActionsBarBubbleDelegate(
|
| + const base::string16& heading,
|
| + const base::string16& body,
|
| + const base::string16& action);
|
| + ~TestToolbarActionsBarBubbleDelegate();
|
| +
|
| + // Returns a delegate to pass to the bubble. Since the bubble typically owns
|
| + // the delegate, it means we can't have this object be the delegate, because
|
| + // it would be deleted once the bubble closes.
|
| + scoped_ptr<ToolbarActionsBarBubbleDelegate> GetDelegate();
|
| +
|
| + void set_dismiss_button_text(const base::string16& dismiss) {
|
| + dismiss_ = dismiss;
|
| + }
|
| + void set_learn_more_button_text(const base::string16& learn_more) {
|
| + learn_more_ = learn_more;
|
| + }
|
| +
|
| + const ToolbarActionsBarBubbleDelegate::CloseAction* close_action() const {
|
| + return close_action_.get();
|
| + }
|
| + bool shown() const { return shown_; }
|
| +
|
| + private:
|
| + class DelegateImpl;
|
| +
|
| + // Whether or not the bubble has been shown.
|
| + bool shown_;
|
| +
|
| + // The action that was taken to close the bubble.
|
| + scoped_ptr<ToolbarActionsBarBubbleDelegate::CloseAction> close_action_;
|
| +
|
| + // Strings for the bubble.
|
| + base::string16 heading_;
|
| + base::string16 body_;
|
| + base::string16 action_;
|
| + base::string16 dismiss_;
|
| + base::string16 learn_more_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(TestToolbarActionsBarBubbleDelegate);
|
| +};
|
| +
|
| +#endif // CHROME_BROWSER_UI_TOOLBAR_TEST_TOOLBAR_ACTIONS_BAR_BUBBLE_DELEGATE_H_
|
|
|