| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |