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

Unified Diff: chrome/browser/ui/views/confirm_bubble_view.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
« no previous file with comments | « chrome/browser/ui/views/confirm_bubble_view.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/confirm_bubble_view.cc
diff --git a/chrome/browser/ui/views/confirm_bubble_view.cc b/chrome/browser/ui/views/confirm_bubble_view.cc
index 4826fd43d15c49fd5c01e947c6e04e056bebd8bd..b91cfac9b5f49e795f51aaa8a0ed2ce780d6f31c 100644
--- a/chrome/browser/ui/views/confirm_bubble_view.cc
+++ b/chrome/browser/ui/views/confirm_bubble_view.cc
@@ -24,25 +24,17 @@ const int kMaxMessageWidth = 400;
} // namespace
-ConfirmBubbleView::ConfirmBubbleView(ConfirmBubbleModel* model)
- : model_(model) {
+ConfirmBubbleView::ConfirmBubbleView(const gfx::Point& anchor_point,
+ ConfirmBubbleModel* model)
+ : BubbleDelegateView(NULL, views::BubbleBorder::NONE, SK_ColorWHITE),
+ anchor_point_(anchor_point),
+ model_(model) {
DCHECK(model);
}
ConfirmBubbleView::~ConfirmBubbleView() {
}
-void ConfirmBubbleView::BubbleClosing(Bubble* bubble, bool closed_by_escape) {
-}
-
-bool ConfirmBubbleView::CloseOnEscape() {
- return true;
-}
-
-bool ConfirmBubbleView::FadeInOnShow() {
- return false;
-}
-
void ConfirmBubbleView::ButtonPressed(views::Button* sender,
const views::Event& event) {
if (sender->tag() == ConfirmBubbleModel::BUTTON_OK)
@@ -56,12 +48,11 @@ void ConfirmBubbleView::LinkClicked(views::Link* source, int event_flags) {
model_->LinkClicked();
}
-void ConfirmBubbleView::ViewHierarchyChanged(bool is_add,
- views::View* parent,
- views::View* child) {
- if (!is_add || child != this)
- return;
+gfx::Point ConfirmBubbleView::GetAnchorPoint() {
+ return anchor_point_;
+}
+void ConfirmBubbleView::Init() {
ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance();
views::GridLayout* layout = new views::GridLayout(this);
SetLayoutManager(layout);
@@ -88,7 +79,6 @@ void ConfirmBubbleView::ViewHierarchyChanged(bool is_add,
DCHECK(!title_text.empty());
views::Label* title_label = new views::Label(title_text);
title_label->SetFont(bundle.GetFont(ResourceBundle::MediumFont));
- title_label->SetBackgroundColor(Bubble::kBackgroundColor);
layout->AddView(title_label);
views::ImageButton* close_button = new views::ImageButton(this);
@@ -111,7 +101,6 @@ void ConfirmBubbleView::ViewHierarchyChanged(bool is_add,
message_label->SetBounds(0, 0, message_width, 0);
message_label->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
message_label->SetMultiLine(true);
- message_label->SetBackgroundColor(Bubble::kBackgroundColor);
layout->StartRow(0, 1);
layout->AddView(message_label);
@@ -122,7 +111,6 @@ void ConfirmBubbleView::ViewHierarchyChanged(bool is_add,
layout->StartRow(0, 1);
views::Link* link_label = new views::Link(link_text);
link_label->set_listener(this);
- link_label->SetBackgroundColor(Bubble::kBackgroundColor);
layout->AddView(link_label);
}
layout->AddPaddingRow(0, views::kLabelToControlVerticalSpacing);
« no previous file with comments | « chrome/browser/ui/views/confirm_bubble_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698