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

Side by Side Diff: ui/aura_shell/examples/bubble.cc

Issue 8368006: Support Windows native textfield, combobox, etc. in new bubbles. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Eliminate Widget return. Created 9 years, 1 month 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 #include "base/utf_string_conversions.h" 5 #include "base/utf_string_conversions.h"
6 #include "views/bubble/bubble_border.h" 6 #include "views/bubble/bubble_border.h"
7 #include "views/bubble/bubble_delegate.h" 7 #include "views/bubble/bubble_delegate.h"
8 #include "views/controls/label.h" 8 #include "views/controls/label.h"
9 #include "views/layout/fill_layout.h" 9 #include "views/layout/fill_layout.h"
10 #include "views/widget/widget.h" 10 #include "views/widget/widget.h"
(...skipping 24 matching lines...) Expand all
35 private: 35 private:
36 string16 label_; 36 string16 label_;
37 }; 37 };
38 38
39 void CreatePointyBubble(views::Widget* parent, const gfx::Point& origin) { 39 void CreatePointyBubble(views::Widget* parent, const gfx::Point& origin) {
40 BubbleConfig config; 40 BubbleConfig config;
41 config.label = ASCIIToUTF16("PointyBubble"); 41 config.label = ASCIIToUTF16("PointyBubble");
42 config.color = SK_ColorWHITE; 42 config.color = SK_ColorWHITE;
43 config.anchor_point = origin; 43 config.anchor_point = origin;
44 config.arrow = views::BubbleBorder::TOP_LEFT; 44 config.arrow = views::BubbleBorder::TOP_LEFT;
45 views::Widget* bubble = views::BubbleDelegateView::CreateBubble( 45 ExampleBubbleDelegateView* bubble_delegate =
46 new ExampleBubbleDelegateView(config), parent); 46 new ExampleBubbleDelegateView(config);
47 bubble->Show(); 47 views::BubbleDelegateView::CreateBubble(bubble_delegate, parent);
48 bubble_delegate->Show();
48 } 49 }
49 50
50 } // namespace examples 51 } // namespace examples
51 } // namespace aura_shell 52 } // namespace aura_shell
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698