| OLD | NEW |
| 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 #include "chrome/browser/ui/views/confirm_bubble_views.h" | 5 #include "chrome/browser/ui/views/confirm_bubble_views.h" |
| 6 | 6 |
| 7 #include "chrome/browser/ui/confirm_bubble.h" | 7 #include "chrome/browser/ui/confirm_bubble.h" |
| 8 #include "chrome/browser/ui/confirm_bubble_model.h" | 8 #include "chrome/browser/ui/confirm_bubble_model.h" |
| 9 #include "chrome/browser/ui/views/constrained_window_views.h" |
| 9 #include "ui/views/controls/label.h" | 10 #include "ui/views/controls/label.h" |
| 10 #include "ui/views/controls/link.h" | 11 #include "ui/views/controls/link.h" |
| 11 #include "ui/views/layout/grid_layout.h" | 12 #include "ui/views/layout/grid_layout.h" |
| 12 #include "ui/views/layout/layout_constants.h" | 13 #include "ui/views/layout/layout_constants.h" |
| 13 #include "ui/views/widget/widget.h" | 14 #include "ui/views/widget/widget.h" |
| 14 | 15 |
| 15 ConfirmBubbleViews::ConfirmBubbleViews(ConfirmBubbleModel* model) | 16 ConfirmBubbleViews::ConfirmBubbleViews(ConfirmBubbleModel* model) |
| 16 : model_(model), | 17 : model_(model), |
| 17 link_(NULL) { | 18 link_(NULL) { |
| 18 views::GridLayout* layout = views::GridLayout::CreatePanel(this); | 19 views::GridLayout* layout = views::GridLayout::CreatePanel(this); |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 model_->LinkClicked(); | 95 model_->LinkClicked(); |
| 95 GetWidget()->Close(); | 96 GetWidget()->Close(); |
| 96 } | 97 } |
| 97 } | 98 } |
| 98 | 99 |
| 99 namespace chrome { | 100 namespace chrome { |
| 100 | 101 |
| 101 void ShowConfirmBubble(gfx::NativeView view, | 102 void ShowConfirmBubble(gfx::NativeView view, |
| 102 const gfx::Point& origin, | 103 const gfx::Point& origin, |
| 103 ConfirmBubbleModel* model) { | 104 ConfirmBubbleModel* model) { |
| 104 views::DialogDelegate::CreateDialogWidget( | 105 CreateBrowserModalDialogViews(new ConfirmBubbleViews(model), view)->Show(); |
| 105 new ConfirmBubbleViews(model), NULL, view)->Show(); | |
| 106 } | 106 } |
| 107 | 107 |
| 108 } // namespace chrome | 108 } // namespace chrome |
| OLD | NEW |