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

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

Issue 8493011: Merge 108537 - Align avatar bubble with edge of anchor control (Closed) Base URL: svn://svn.chromium.org/chrome/branches/912/src/
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 BubbleDelegate* delegate, 84 BubbleDelegate* delegate,
85 Profile* profile, 85 Profile* profile,
86 const GURL& url, 86 const GURL& url,
87 bool newly_bookmarked) { 87 bool newly_bookmarked) {
88 if (IsShowing()) 88 if (IsShowing())
89 return; 89 return;
90 90
91 bookmark_bubble_ = new BookmarkBubbleView(delegate, profile, url, 91 bookmark_bubble_ = new BookmarkBubbleView(delegate, profile, url,
92 newly_bookmarked); 92 newly_bookmarked);
93 Bubble* bubble = Bubble::Show( 93 Bubble* bubble = Bubble::Show(
94 parent, bounds, views::BubbleBorder::TOP_RIGHT, bookmark_bubble_, 94 parent, bounds, views::BubbleBorder::TOP_RIGHT,
95 views::BubbleBorder::ALIGN_ARROW_TO_MID_ANCHOR, bookmark_bubble_,
95 bookmark_bubble_); 96 bookmark_bubble_);
96 // |bubble_| can be set to NULL in BubbleClosing when we close the bubble 97 // |bubble_| can be set to NULL in BubbleClosing when we close the bubble
97 // asynchronously. However, that can happen during the Show call above if the 98 // asynchronously. However, that can happen during the Show call above if the
98 // window loses activation while we are getting to ready to show the bubble, 99 // window loses activation while we are getting to ready to show the bubble,
99 // so we must check to make sure we still have a valid bubble before 100 // so we must check to make sure we still have a valid bubble before
100 // proceeding. 101 // proceeding.
101 if (!bookmark_bubble_) 102 if (!bookmark_bubble_)
102 return; 103 return;
103 bookmark_bubble_->set_bubble(bubble); 104 bookmark_bubble_->set_bubble(bubble);
104 bubble->SizeToContents(); 105 bubble->SizeToContents();
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
409 const BookmarkNode* new_parent = 410 const BookmarkNode* new_parent =
410 parent_model_.GetNodeAt(parent_combobox_->selected_item()); 411 parent_model_.GetNodeAt(parent_combobox_->selected_item());
411 if (new_parent != node->parent()) { 412 if (new_parent != node->parent()) {
412 UserMetrics::RecordAction( 413 UserMetrics::RecordAction(
413 UserMetricsAction("BookmarkBubble_ChangeParent")); 414 UserMetricsAction("BookmarkBubble_ChangeParent"));
414 model->Move(node, new_parent, new_parent->child_count()); 415 model->Move(node, new_parent, new_parent->child_count());
415 } 416 }
416 } 417 }
417 } 418 }
418 } 419 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/avatar_menu_button.cc ('k') | chrome/browser/ui/views/bubble/border_contents.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698