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

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

Issue 8870003: Merge BorderContentsView into BubbleFrameView; simplify. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove allow_bubble_offscreen, simplify and update tests. Created 9 years 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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 } 113 }
114 } 114 }
115 115
116 views::View* BookmarkBubbleView::GetInitiallyFocusedView() { 116 views::View* BookmarkBubbleView::GetInitiallyFocusedView() {
117 return title_tf_; 117 return title_tf_;
118 } 118 }
119 119
120 gfx::Rect BookmarkBubbleView::GetAnchorRect() { 120 gfx::Rect BookmarkBubbleView::GetAnchorRect() {
121 // Compensate for some built-in padding in the star image. 121 // Compensate for some built-in padding in the star image.
122 gfx::Rect rect(BubbleDelegateView::GetAnchorRect()); 122 gfx::Rect rect(BubbleDelegateView::GetAnchorRect());
123 rect.Offset(0, -5); 123 rect.Inset(0, anchor_view() ? 5 : 0);
124 return rect; 124 return rect;
125 } 125 }
126 126
127 void BookmarkBubbleView::WindowClosing() { 127 void BookmarkBubbleView::WindowClosing() {
128 // We have to reset |bubble_| here, not in our destructor, because we'll be 128 // We have to reset |bubble_| here, not in our destructor, because we'll be
129 // destroyed asynchronously and the shown state will be checked before then. 129 // destroyed asynchronously and the shown state will be checked before then.
130 DCHECK(bookmark_bubble_ == this); 130 DCHECK(bookmark_bubble_ == this);
131 bookmark_bubble_ = NULL; 131 bookmark_bubble_ = NULL;
132 132
133 content::NotificationService::current()->Notify( 133 content::NotificationService::current()->Notify(
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 const BookmarkNode* new_parent = 332 const BookmarkNode* new_parent =
333 parent_model_.GetNodeAt(parent_combobox_->selected_item()); 333 parent_model_.GetNodeAt(parent_combobox_->selected_item());
334 if (new_parent != node->parent()) { 334 if (new_parent != node->parent()) {
335 UserMetrics::RecordAction( 335 UserMetrics::RecordAction(
336 UserMetricsAction("BookmarkBubble_ChangeParent")); 336 UserMetricsAction("BookmarkBubble_ChangeParent"));
337 model->Move(node, new_parent, new_parent->child_count()); 337 model->Move(node, new_parent, new_parent->child_count());
338 } 338 }
339 } 339 }
340 } 340 }
341 } 341 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698