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

Side by Side Diff: chrome/browser/ui/views/bookmarks/bookmark_bubble_view.cc

Issue 12897004: Remove BubbleDelegateView::Show(); call GetWidget()->Show() instead; etc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixup more BubbleDelegateView::Show() calls. Created 7 years, 9 months 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/bookmarks/bookmark_bubble_view.h" 5 #include "chrome/browser/ui/views/bookmarks/bookmark_bubble_view.h"
6 6
7 #include "base/string16.h" 7 #include "base/string16.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/app/chrome_command_ids.h" 10 #include "chrome/app/chrome_command_ids.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 void BookmarkBubbleView::ShowBubble(views::View* anchor_view, 79 void BookmarkBubbleView::ShowBubble(views::View* anchor_view,
80 BookmarkBubbleViewObserver* observer, 80 BookmarkBubbleViewObserver* observer,
81 Profile* profile, 81 Profile* profile,
82 const GURL& url, 82 const GURL& url,
83 bool newly_bookmarked) { 83 bool newly_bookmarked) {
84 if (IsShowing()) 84 if (IsShowing())
85 return; 85 return;
86 86
87 bookmark_bubble_ = new BookmarkBubbleView(anchor_view, observer, profile, url, 87 bookmark_bubble_ = new BookmarkBubbleView(anchor_view, observer, profile, url,
88 newly_bookmarked); 88 newly_bookmarked);
89 views::BubbleDelegateView::CreateBubble(bookmark_bubble_); 89 views::BubbleDelegateView::CreateBubble(bookmark_bubble_)->Show();
90 bookmark_bubble_->Show();
91 // Select the entire title textfield contents when the bubble is first shown. 90 // Select the entire title textfield contents when the bubble is first shown.
92 bookmark_bubble_->title_tf_->SelectAll(true); 91 bookmark_bubble_->title_tf_->SelectAll(true);
93 92
94 if (bookmark_bubble_->observer_) 93 if (bookmark_bubble_->observer_)
95 bookmark_bubble_->observer_->OnBookmarkBubbleShown(url); 94 bookmark_bubble_->observer_->OnBookmarkBubbleShown(url);
96 } 95 }
97 96
98 // static 97 // static
99 bool BookmarkBubbleView::IsShowing() { 98 bool BookmarkBubbleView::IsShowing() {
100 return bookmark_bubble_ != NULL; 99 return bookmark_bubble_ != NULL;
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 const BookmarkNode* new_parent = 336 const BookmarkNode* new_parent =
338 parent_model_.GetNodeAt(parent_combobox_->selected_index()); 337 parent_model_.GetNodeAt(parent_combobox_->selected_index());
339 if (new_parent != node->parent()) { 338 if (new_parent != node->parent()) {
340 content::RecordAction( 339 content::RecordAction(
341 UserMetricsAction("BookmarkBubble_ChangeParent")); 340 UserMetricsAction("BookmarkBubble_ChangeParent"));
342 model->Move(node, new_parent, new_parent->child_count()); 341 model->Move(node, new_parent, new_parent->child_count());
343 } 342 }
344 } 343 }
345 } 344 }
346 } 345 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/avatar_menu_bubble_view.cc ('k') | chrome/browser/ui/views/bookmarks/bookmark_prompt_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698