blob: 32cf0a459b6a5fd3cf7ab4e36f04c25a298b8a06 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
// Copyright (c) 2011 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 VIEWS_BUBBLE_BUBBLE_DELEGATE_H_
#define VIEWS_BUBBLE_BUBBLE_DELEGATE_H_
#pragma once
#include <string>
#include "views/bubble/bubble_border.h"
#include "views/view.h"
#include "views/widget/widget_delegate.h"
namespace views {
class BubbleBorder;
class BubbleFrameView;
class BubbleView;
class View;
// BubbleDelegate interface to create bubble frame view and bubble client view.
//
///////////////////////////////////////////////////////////////////////////////
class VIEWS_EXPORT BubbleDelegate : public WidgetDelegate {
public:
virtual BubbleDelegate* AsBubbleDelegate() OVERRIDE;
virtual ClientView* CreateClientView(Widget* widget) OVERRIDE;
virtual NonClientFrameView* CreateNonClientFrameView() OVERRIDE;
virtual SkColor GetFrameBackgroundColor() = 0;
virtual gfx::Rect GetBounds() = 0;
virtual BubbleBorder::ArrowLocation GetFrameArrowLocation() = 0;
const BubbleView* GetBubbleView() const;
BubbleView* GetBubbleView();
const BubbleFrameView* GetBubbleFrameView() const;
BubbleFrameView* GetBubbleFrameView();
protected:
virtual ~BubbleDelegate() {}
};
// BubbleDelegateView to create bubble frame view and bubble client view.
//
///////////////////////////////////////////////////////////////////////////////
class VIEWS_EXPORT BubbleDelegateView : public BubbleDelegate, public View {
public:
explicit BubbleDelegateView(Widget* frame);
virtual ~BubbleDelegateView();
// Overridden from WidgetDelegate:
virtual Widget* GetWidget() OVERRIDE;
virtual const Widget* GetWidget() const OVERRIDE;
private:
Widget* frame_;
DISALLOW_COPY_AND_ASSIGN(BubbleDelegateView);
};
} // namespace views
#endif // VIEWS_BUBBLE_BUBBLE_DELEGATE_H_
|