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

Side by Side Diff: chrome/browser/views/info_bubble.h

Issue 2874004: InfoBubble::ShowFocusless() added not to grab the focus when being shown.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 6 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 | « chrome/browser/chromeos/volume_bubble.cc ('k') | chrome/browser/views/info_bubble.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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 CHROME_BROWSER_VIEWS_INFO_BUBBLE_H_ 5 #ifndef CHROME_BROWSER_VIEWS_INFO_BUBBLE_H_
6 #define CHROME_BROWSER_VIEWS_INFO_BUBBLE_H_ 6 #define CHROME_BROWSER_VIEWS_INFO_BUBBLE_H_
7 7
8 #include "app/slide_animation.h" 8 #include "app/slide_animation.h"
9 #include "third_party/skia/include/core/SkColor.h" 9 #include "third_party/skia/include/core/SkColor.h"
10 #include "views/accelerator.h" 10 #include "views/accelerator.h"
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 // You may provide an optional |delegate| to: 189 // You may provide an optional |delegate| to:
190 // - Be notified when the InfoBubble is closed. 190 // - Be notified when the InfoBubble is closed.
191 // - Prevent the InfoBubble from being closed when the Escape key is 191 // - Prevent the InfoBubble from being closed when the Escape key is
192 // pressed (the default behavior). 192 // pressed (the default behavior).
193 static InfoBubble* Show(views::Widget* parent, 193 static InfoBubble* Show(views::Widget* parent,
194 const gfx::Rect& position_relative_to, 194 const gfx::Rect& position_relative_to,
195 BubbleBorder::ArrowLocation arrow_location, 195 BubbleBorder::ArrowLocation arrow_location,
196 views::View* contents, 196 views::View* contents,
197 InfoBubbleDelegate* delegate); 197 InfoBubbleDelegate* delegate);
198 198
199 #if defined(OS_CHROMEOS)
200 // Shows the InfoBubble not grabbing the focus. Others are the same as above.
201 // TYPE_POPUP widget is used to achieve the focusless effect.
202 static InfoBubble* ShowFocusless(views::Widget* parent,
203 const gfx::Rect& position_relative_to,
204 BubbleBorder::ArrowLocation arrow_location,
205 views::View* contents,
206 InfoBubbleDelegate* delegate);
207 #endif
208
199 // Resizes and potentially moves the InfoBubble to best accommodate the 209 // Resizes and potentially moves the InfoBubble to best accommodate the
200 // contents preferred size. 210 // contents preferred size.
201 void SizeToContents(); 211 void SizeToContents();
202 212
203 // Whether the InfoBubble should fade away when it closes. Generally speaking, 213 // Whether the InfoBubble should fade away when it closes. Generally speaking,
204 // we use FadeOut when the user selects something within the bubble that 214 // we use FadeOut when the user selects something within the bubble that
205 // causes the bubble to dismiss. We don't use it when the bubble gets 215 // causes the bubble to dismiss. We don't use it when the bubble gets
206 // deactivated as a result of clicking outside the bubble. 216 // deactivated as a result of clicking outside the bubble.
207 void set_fade_away_on_close(bool fade_away_on_close) { 217 void set_fade_away_on_close(bool fade_away_on_close) {
208 fade_away_on_close_ = fade_away_on_close; 218 fade_away_on_close_ = fade_away_on_close;
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 297
288 gfx::Rect position_relative_to_; 298 gfx::Rect position_relative_to_;
289 BubbleBorder::ArrowLocation arrow_location_; 299 BubbleBorder::ArrowLocation arrow_location_;
290 300
291 views::View* contents_; 301 views::View* contents_;
292 302
293 DISALLOW_COPY_AND_ASSIGN(InfoBubble); 303 DISALLOW_COPY_AND_ASSIGN(InfoBubble);
294 }; 304 };
295 305
296 #endif // CHROME_BROWSER_VIEWS_INFO_BUBBLE_H_ 306 #endif // CHROME_BROWSER_VIEWS_INFO_BUBBLE_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/volume_bubble.cc ('k') | chrome/browser/views/info_bubble.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698