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

Side by Side Diff: views/bubble/bubble_frame_view.h

Issue 8227003: Views Bubble API adjustments and cleanup (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge Created 9 years, 2 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 VIEWS_BUBBLE_BUBBLE_FRAME_VIEW_H_ 5 #ifndef VIEWS_BUBBLE_BUBBLE_FRAME_VIEW_H_
6 #define VIEWS_BUBBLE_BUBBLE_FRAME_VIEW_H_ 6 #define VIEWS_BUBBLE_BUBBLE_FRAME_VIEW_H_
7 #pragma once 7 #pragma once
8 8
9 #include "views/bubble/bubble_border.h" 9 #include "views/bubble/bubble_border.h"
10 #include "views/widget/widget.h" 10 #include "views/window/non_client_view.h"
11 #include "views/window/client_view.h"
12 #include "views/window/window_resources.h"
13
14 namespace gfx {
15 class Canvas;
16 class Font;
17 class Size;
18 class Path;
19 class Point;
20 }
21 11
22 namespace views { 12 namespace views {
23 13
24 // BubbleFrameView to render BubbleBorder. 14 // BubbleFrameView to render BubbleBorder.
25 // 15 //
26 //////////////////////////////////////////////////////////////////////////////// 16 ////////////////////////////////////////////////////////////////////////////////
27 class VIEWS_EXPORT BubbleFrameView : public NonClientFrameView { 17 class VIEWS_EXPORT BubbleFrameView : public NonClientFrameView {
28 public: 18 public:
29 BubbleFrameView(Widget* frame, 19 BubbleFrameView(BubbleBorder::ArrowLocation location,
30 const gfx::Rect& bounds, 20 const gfx::Size& client_size,
31 SkColor color, 21 SkColor color);
32 BubbleBorder::ArrowLocation location);
33 virtual ~BubbleFrameView(); 22 virtual ~BubbleFrameView();
34 23
35 // NonClientFrameView overrides: 24 // NonClientFrameView overrides:
36 virtual gfx::Rect GetBoundsForClientView() const OVERRIDE; 25 virtual gfx::Rect GetBoundsForClientView() const OVERRIDE;
37 virtual gfx::Rect GetWindowBoundsForClientBounds( 26 virtual gfx::Rect GetWindowBoundsForClientBounds(
38 const gfx::Rect& client_bounds) const OVERRIDE; 27 const gfx::Rect& client_bounds) const OVERRIDE;
39 virtual int NonClientHitTest(const gfx::Point& point) OVERRIDE; 28 virtual int NonClientHitTest(const gfx::Point& point) OVERRIDE;
40 virtual void GetWindowMask( 29 virtual void GetWindowMask(const gfx::Size& size,
41 const gfx::Size& size, gfx::Path* window_mask) OVERRIDE; 30 gfx::Path* window_mask) OVERRIDE {}
42 virtual void EnableClose(bool enable) OVERRIDE; 31 virtual void EnableClose(bool enable) OVERRIDE {}
43 virtual void ResetWindowControls() OVERRIDE; 32 virtual void ResetWindowControls() OVERRIDE {}
44 virtual void UpdateWindowIcon() OVERRIDE; 33 virtual void UpdateWindowIcon() OVERRIDE {}
45 34
46 // View overrides: 35 // View overrides:
47 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; 36 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
48 virtual gfx::Size GetPreferredSize() OVERRIDE; 37 virtual gfx::Size GetPreferredSize() OVERRIDE;
49 38
50 private: 39 private:
51 // Not owned.
52 Widget* frame_;
53 // Window bounds in screen coordinates.
54 gfx::Rect frame_bounds_;
55 // The bubble border object owned by this view.
56 BubbleBorder* bubble_border_;
57 // The bubble background object owned by this view.
58 BubbleBackground* bubble_background_;
59
60 DISALLOW_COPY_AND_ASSIGN(BubbleFrameView); 40 DISALLOW_COPY_AND_ASSIGN(BubbleFrameView);
61 }; 41 };
62 42
63 } // namespace views 43 } // namespace views
64 44
65 #endif // VIEWS_BUBBLE_BUBBLE_FRAME_VIEW_H_ 45 #endif // VIEWS_BUBBLE_BUBBLE_FRAME_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698