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

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: Rebase Created 8 years, 4 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
« no previous file with comments | « ui/views/bubble/bubble_delegate.cc ('k') | ui/views/bubble/bubble_frame_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // Sets the border to |border|, taking ownership. Important: do not call
22 SkColor color, 22 // set_border() directly to change the border, use SetBubbleBorder() instead.
23 const gfx::Insets& margins); 23 BubbleFrameView(const gfx::Insets& margins, BubbleBorder* border);
24 virtual ~BubbleFrameView(); 24 virtual ~BubbleFrameView();
25 25
26 // NonClientFrameView overrides: 26 // NonClientFrameView overrides:
27 virtual gfx::Rect GetBoundsForClientView() const OVERRIDE; 27 virtual gfx::Rect GetBoundsForClientView() const OVERRIDE;
28 virtual gfx::Rect GetWindowBoundsForClientBounds( 28 virtual gfx::Rect GetWindowBoundsForClientBounds(
29 const gfx::Rect& client_bounds) const OVERRIDE; 29 const gfx::Rect& client_bounds) const OVERRIDE;
30 virtual int NonClientHitTest(const gfx::Point& point) OVERRIDE; 30 virtual int NonClientHitTest(const gfx::Point& point) OVERRIDE;
31 virtual void GetWindowMask(const gfx::Size& size, 31 virtual void GetWindowMask(const gfx::Size& size,
32 gfx::Path* window_mask) OVERRIDE {} 32 gfx::Path* window_mask) OVERRIDE {}
33 virtual void ResetWindowControls() OVERRIDE {} 33 virtual void ResetWindowControls() OVERRIDE {}
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 68
69 // Margins between the content and the inside of the border, in pixels. 69 // Margins between the content and the inside of the border, in pixels.
70 gfx::Insets content_margins_; 70 gfx::Insets content_margins_;
71 71
72 DISALLOW_COPY_AND_ASSIGN(BubbleFrameView); 72 DISALLOW_COPY_AND_ASSIGN(BubbleFrameView);
73 }; 73 };
74 74
75 } // namespace views 75 } // namespace views
76 76
77 #endif // UI_VIEWS_BUBBLE_BUBBLE_FRAME_VIEW_H_ 77 #endif // UI_VIEWS_BUBBLE_BUBBLE_FRAME_VIEW_H_
OLDNEW
« no previous file with comments | « ui/views/bubble/bubble_delegate.cc ('k') | ui/views/bubble/bubble_frame_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698