| 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 "grit/theme_resources.h" | 9 #include "grit/theme_resources.h" |
| 10 #include "ui/base/resource/resource_bundle.h" | 10 #include "ui/base/resource/resource_bundle.h" |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 } | 143 } |
| 144 if (has_cancel_button) { | 144 if (has_cancel_button) { |
| 145 views::TextButton* cancel_button = new views::NativeTextButton( | 145 views::TextButton* cancel_button = new views::NativeTextButton( |
| 146 this, model_->GetButtonLabel(ConfirmBubbleModel::BUTTON_CANCEL)); | 146 this, model_->GetButtonLabel(ConfirmBubbleModel::BUTTON_CANCEL)); |
| 147 cancel_button->set_tag(ConfirmBubbleModel::BUTTON_CANCEL); | 147 cancel_button->set_tag(ConfirmBubbleModel::BUTTON_CANCEL); |
| 148 layout->AddView(cancel_button); | 148 layout->AddView(cancel_button); |
| 149 } | 149 } |
| 150 } | 150 } |
| 151 } | 151 } |
| 152 | 152 |
| 153 namespace browser { | 153 namespace chrome { |
| 154 | 154 |
| 155 void ShowConfirmBubble(gfx::NativeView view, | 155 void ShowConfirmBubble(gfx::NativeView view, |
| 156 const gfx::Point& origin, | 156 const gfx::Point& origin, |
| 157 ConfirmBubbleModel* model) { | 157 ConfirmBubbleModel* model) { |
| 158 ConfirmBubbleViews* bubble = new ConfirmBubbleViews(origin, model); | 158 ConfirmBubbleViews* bubble = new ConfirmBubbleViews(origin, model); |
| 159 views::BubbleDelegateView::CreateBubble(bubble); | 159 views::BubbleDelegateView::CreateBubble(bubble); |
| 160 bubble->Show(); | 160 bubble->Show(); |
| 161 } | 161 } |
| 162 | 162 |
| 163 } // namespace browser | 163 } // namespace chrome |
| OLD | NEW |