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

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

Issue 8227003: Views Bubble API adjustments and cleanup (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add close_on_esc setting and fade-in functionality. 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
« no previous file with comments | « ui/aura_shell/examples/window_type_launcher.cc ('k') | views/bubble/bubble_border.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) 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_BORDER_H_ 5 #ifndef VIEWS_BUBBLE_BUBBLE_BORDER_H_
6 #define VIEWS_BUBBLE_BUBBLE_BORDER_H_ 6 #define VIEWS_BUBBLE_BUBBLE_BORDER_H_
7 #pragma once 7 #pragma once
8 8
9 #include "third_party/skia/include/core/SkColor.h"
10 #include "views/background.h" 9 #include "views/background.h"
11 #include "views/border.h" 10 #include "views/border.h"
12 11
13 class SkBitmap; 12 class SkBitmap;
14 13
15 namespace views { 14 namespace views {
16 15
17 // Renders a border, with optional arrow, and a custom dropshadow. 16 // Renders a border, with optional arrow, and a custom dropshadow.
18 // This can be used to produce floating "bubble" objects with rounded corners. 17 // This can be used to produce floating "bubble" objects with rounded corners.
19 class VIEWS_EXPORT BubbleBorder : public views::Border { 18 class VIEWS_EXPORT BubbleBorder : public views::Border {
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 // overflow it differ from desired. 100 // overflow it differ from desired.
102 int SetArrowOffset(int offset, const gfx::Size& contents_size); 101 int SetArrowOffset(int offset, const gfx::Size& contents_size);
103 102
104 // Overridden from views::Border: 103 // Overridden from views::Border:
105 virtual void GetInsets(gfx::Insets* insets) const; 104 virtual void GetInsets(gfx::Insets* insets) const;
106 105
107 private: 106 private:
108 // Loads images if necessary. 107 // Loads images if necessary.
109 static void InitClass(); 108 static void InitClass();
110 109
111 virtual ~BubbleBorder() { } 110 virtual ~BubbleBorder();
112 111
113 // Overridden from views::Border: 112 // Overridden from views::Border:
114 virtual void Paint(const views::View& view, gfx::Canvas* canvas) const; 113 virtual void Paint(const views::View& view, gfx::Canvas* canvas) const;
115 114
116 void DrawEdgeWithArrow(gfx::Canvas* canvas, 115 void DrawEdgeWithArrow(gfx::Canvas* canvas,
117 bool is_horizontal, 116 bool is_horizontal,
118 SkBitmap* edge, 117 SkBitmap* edge,
119 SkBitmap* arrow, 118 SkBitmap* arrow,
120 int start_x, 119 int start_x,
121 int start_y, 120 int start_y,
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 166
168 private: 167 private:
169 BubbleBorder* border_; 168 BubbleBorder* border_;
170 169
171 DISALLOW_COPY_AND_ASSIGN(BubbleBackground); 170 DISALLOW_COPY_AND_ASSIGN(BubbleBackground);
172 }; 171 };
173 172
174 } // namespace views 173 } // namespace views
175 174
176 #endif // VIEWS_BUBBLE_BUBBLE_BORDER_H_ 175 #endif // VIEWS_BUBBLE_BUBBLE_BORDER_H_
OLDNEW
« no previous file with comments | « ui/aura_shell/examples/window_type_launcher.cc ('k') | views/bubble/bubble_border.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698