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

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

Issue 10808066: Fix position of web notification bubble and arrow (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: . Created 8 years, 5 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 UI_VIEWS_BUBBLE_BUBBLE_FRAME_VIEW_H_ 5 #ifndef UI_VIEWS_BUBBLE_BUBBLE_FRAME_VIEW_H_
6 #define UI_VIEWS_BUBBLE_BUBBLE_FRAME_VIEW_H_ 6 #define UI_VIEWS_BUBBLE_BUBBLE_FRAME_VIEW_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/gtest_prod_util.h" 10 #include "base/gtest_prod_util.h"
11 #include "third_party/skia/include/core/SkColor.h" 11 #include "third_party/skia/include/core/SkColor.h"
12 #include "ui/gfx/insets.h" 12 #include "ui/gfx/insets.h"
13 #include "ui/views/bubble/bubble_border.h" 13 #include "ui/views/bubble/bubble_border.h"
14 #include "ui/views/window/non_client_view.h" 14 #include "ui/views/window/non_client_view.h"
15 15
16 namespace views { 16 namespace views {
17 17
18 // This is a NonClientFrameView used to render the BubbleBorder. 18 // This is a NonClientFrameView used to render the BubbleBorder.
19 class VIEWS_EXPORT BubbleFrameView : public NonClientFrameView { 19 class VIEWS_EXPORT BubbleFrameView : public NonClientFrameView {
20 public: 20 public:
21 BubbleFrameView(BubbleBorder::ArrowLocation arrow_location, 21 explicit BubbleFrameView(const gfx::Insets& margins);
22 SkColor color,
23 const gfx::Insets& margins);
24 virtual ~BubbleFrameView(); 22 virtual ~BubbleFrameView();
25 23
26 // NonClientFrameView overrides: 24 // NonClientFrameView overrides:
27 virtual gfx::Rect GetBoundsForClientView() const OVERRIDE; 25 virtual gfx::Rect GetBoundsForClientView() const OVERRIDE;
28 virtual gfx::Rect GetWindowBoundsForClientBounds( 26 virtual gfx::Rect GetWindowBoundsForClientBounds(
29 const gfx::Rect& client_bounds) const OVERRIDE; 27 const gfx::Rect& client_bounds) const OVERRIDE;
30 virtual int NonClientHitTest(const gfx::Point& point) OVERRIDE; 28 virtual int NonClientHitTest(const gfx::Point& point) OVERRIDE;
31 virtual void GetWindowMask(const gfx::Size& size, 29 virtual void GetWindowMask(const gfx::Size& size,
32 gfx::Path* window_mask) OVERRIDE {} 30 gfx::Path* window_mask) OVERRIDE {}
33 virtual void ResetWindowControls() OVERRIDE {} 31 virtual void ResetWindowControls() OVERRIDE {}
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 66
69 // Margins between the content and the inside of the border, in pixels. 67 // Margins between the content and the inside of the border, in pixels.
70 gfx::Insets content_margins_; 68 gfx::Insets content_margins_;
71 69
72 DISALLOW_COPY_AND_ASSIGN(BubbleFrameView); 70 DISALLOW_COPY_AND_ASSIGN(BubbleFrameView);
73 }; 71 };
74 72
75 } // namespace views 73 } // namespace views
76 74
77 #endif // UI_VIEWS_BUBBLE_BUBBLE_FRAME_VIEW_H_ 75 #endif // UI_VIEWS_BUBBLE_BUBBLE_FRAME_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698