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

Unified Diff: chrome/browser/ui/confirm_bubble_model.cc

Issue 8746001: Rebase ConfirmBubble on the new views bubble. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Restore the ConfirmBubbleModel::Show NativeView argument. 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/confirm_bubble_model.cc
diff --git a/chrome/browser/ui/confirm_bubble_model.cc b/chrome/browser/ui/confirm_bubble_model.cc
index 5c4fad7eeebebd2bd6243c9db4f8e85d0a2a17f5..948132fe44123282da1d7b68e3640779781c3a60 100644
--- a/chrome/browser/ui/confirm_bubble_model.cc
+++ b/chrome/browser/ui/confirm_bubble_model.cc
@@ -10,8 +10,7 @@
#if defined(TOOLKIT_VIEWS)
#include "chrome/browser/ui/views/confirm_bubble_view.h"
-#include "ui/gfx/rect.h"
-#include "ui/views/widget/widget.h"
+#include "chrome/browser/ui/views/window.h"
#endif
ConfirmBubbleModel::ConfirmBubbleModel() {
@@ -45,16 +44,9 @@ void ConfirmBubbleModel::Show(gfx::NativeView view,
const gfx::Point& origin,
ConfirmBubbleModel* model) {
#if defined(TOOLKIT_VIEWS)
- views::Widget* parent = views::Widget::GetTopLevelWidgetForNativeView(view);
- if (!parent)
- return;
-
- ConfirmBubbleView* bubble_view = new ConfirmBubbleView(model);
- Bubble* bubble = Bubble::Show(parent, gfx::Rect(origin, gfx::Size()),
- views::BubbleBorder::NONE,
- views::BubbleBorder::ALIGN_ARROW_TO_MID_ANCHOR,
- bubble_view, bubble_view);
- bubble->SizeToContents();
+ ConfirmBubbleView* bubble_view = new ConfirmBubbleView(origin, model);
+ browser::CreateViewsBubble(bubble_view);
+ bubble_view->Show();
#else
NOTIMPLEMENTED(); // Bug 99130: Implement it.
#endif
« no previous file with comments | « chrome/browser/tab_contents/spellchecker_submenu_observer.cc ('k') | chrome/browser/ui/views/confirm_bubble_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698