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

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

Issue 5981008: Sizes bookmark bubble after it was shown. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/chrome/browser
Patch Set: Created 9 years, 11 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/views/bookmark_bubble_view.h" 5 #include "chrome/browser/views/bookmark_bubble_view.h"
6 6
7 #include "app/keyboard_codes.h" 7 #include "app/keyboard_codes.h"
8 #include "app/l10n_util.h" 8 #include "app/l10n_util.h"
9 #include "app/resource_bundle.h" 9 #include "app/resource_bundle.h"
10 #include "base/string16.h" 10 #include "base/string16.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 const GURL& url, 85 const GURL& url,
86 bool newly_bookmarked) { 86 bool newly_bookmarked) {
87 if (IsShowing()) 87 if (IsShowing())
88 return; 88 return;
89 89
90 bubble_ = new BookmarkBubbleView(delegate, profile, url, newly_bookmarked); 90 bubble_ = new BookmarkBubbleView(delegate, profile, url, newly_bookmarked);
91 InfoBubble* info_bubble = InfoBubble::Show( 91 InfoBubble* info_bubble = InfoBubble::Show(
92 parent->GetClientView()->GetWidget(), bounds, BubbleBorder::TOP_RIGHT, 92 parent->GetClientView()->GetWidget(), bounds, BubbleBorder::TOP_RIGHT,
93 bubble_, bubble_); 93 bubble_, bubble_);
94 bubble_->set_info_bubble(info_bubble); 94 bubble_->set_info_bubble(info_bubble);
95 info_bubble->SizeToContents();
95 GURL url_ptr(url); 96 GURL url_ptr(url);
96 NotificationService::current()->Notify( 97 NotificationService::current()->Notify(
97 NotificationType::BOOKMARK_BUBBLE_SHOWN, 98 NotificationType::BOOKMARK_BUBBLE_SHOWN,
98 Source<Profile>(profile->GetOriginalProfile()), 99 Source<Profile>(profile->GetOriginalProfile()),
99 Details<GURL>(&url_ptr)); 100 Details<GURL>(&url_ptr));
100 bubble_->BubbleShown(); 101 bubble_->BubbleShown();
101 } 102 }
102 103
103 // static 104 // static
104 bool BookmarkBubbleView::IsShowing() { 105 bool BookmarkBubbleView::IsShowing() {
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 const BookmarkNode* new_parent = 405 const BookmarkNode* new_parent =
405 parent_model_.GetNodeAt(parent_combobox_->selected_item()); 406 parent_model_.GetNodeAt(parent_combobox_->selected_item());
406 if (new_parent != node->GetParent()) { 407 if (new_parent != node->GetParent()) {
407 UserMetrics::RecordAction( 408 UserMetrics::RecordAction(
408 UserMetricsAction("BookmarkBubble_ChangeParent"), profile_); 409 UserMetricsAction("BookmarkBubble_ChangeParent"), profile_);
409 model->Move(node, new_parent, new_parent->GetChildCount()); 410 model->Move(node, new_parent, new_parent->GetChildCount());
410 } 411 }
411 } 412 }
412 } 413 }
413 } 414 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698