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

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: Sync and merge. 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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 } 114 }
115 } 115 }
116 116
117 views::View* BookmarkBubbleView::GetInitiallyFocusedView() { 117 views::View* BookmarkBubbleView::GetInitiallyFocusedView() {
118 return title_tf_; 118 return title_tf_;
119 } 119 }
120 120
121 gfx::Rect BookmarkBubbleView::GetAnchorRect() { 121 gfx::Rect BookmarkBubbleView::GetAnchorRect() {
122 // Compensate for some built-in padding in the star image. 122 // Compensate for some built-in padding in the star image.
123 gfx::Rect rect(BubbleDelegateView::GetAnchorRect()); 123 gfx::Rect rect(BubbleDelegateView::GetAnchorRect());
124 rect.Offset(0, -5); 124 rect.Inset(0, anchor_view() ? 5 : 0);
125 return rect; 125 return rect;
126 } 126 }
127 127
128 void BookmarkBubbleView::WindowClosing() { 128 void BookmarkBubbleView::WindowClosing() {
129 // We have to reset |bubble_| here, not in our destructor, because we'll be 129 // We have to reset |bubble_| here, not in our destructor, because we'll be
130 // destroyed asynchronously and the shown state will be checked before then. 130 // destroyed asynchronously and the shown state will be checked before then.
131 DCHECK(bookmark_bubble_ == this); 131 DCHECK(bookmark_bubble_ == this);
132 bookmark_bubble_ = NULL; 132 bookmark_bubble_ = NULL;
133 133
134 content::NotificationService::current()->Notify( 134 content::NotificationService::current()->Notify(
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 const BookmarkNode* new_parent = 333 const BookmarkNode* new_parent =
334 parent_model_.GetNodeAt(parent_combobox_->selected_item()); 334 parent_model_.GetNodeAt(parent_combobox_->selected_item());
335 if (new_parent != node->parent()) { 335 if (new_parent != node->parent()) {
336 content::RecordAction( 336 content::RecordAction(
337 UserMetricsAction("BookmarkBubble_ChangeParent")); 337 UserMetricsAction("BookmarkBubble_ChangeParent"));
338 model->Move(node, new_parent, new_parent->child_count()); 338 model->Move(node, new_parent, new_parent->child_count());
339 } 339 }
340 } 340 }
341 } 341 }
342 } 342 }
OLDNEW
« no previous file with comments | « chrome/browser/speech/speech_input_bubble_views.cc ('k') | chrome/browser/ui/views/content_setting_bubble_contents.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698