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

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

Issue 13142003: Fix app list position in windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits Created 7 years, 8 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
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/content_setting_bubble_contents.h" 5 #include "chrome/browser/ui/views/content_setting_bubble_contents.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 WebContents* web_contents, 144 WebContents* web_contents,
145 views::View* anchor_view, 145 views::View* anchor_view,
146 views::BubbleBorder::ArrowLocation arrow_location) 146 views::BubbleBorder::ArrowLocation arrow_location)
147 : BubbleDelegateView(anchor_view, arrow_location), 147 : BubbleDelegateView(anchor_view, arrow_location),
148 content_setting_bubble_model_(content_setting_bubble_model), 148 content_setting_bubble_model_(content_setting_bubble_model),
149 web_contents_(web_contents), 149 web_contents_(web_contents),
150 custom_link_(NULL), 150 custom_link_(NULL),
151 manage_link_(NULL), 151 manage_link_(NULL),
152 close_button_(NULL) { 152 close_button_(NULL) {
153 // Compensate for built-in vertical padding in the anchor view's image. 153 // Compensate for built-in vertical padding in the anchor view's image.
154 set_anchor_insets(gfx::Insets(5, 0, 5, 0)); 154 set_anchor_view_insets(gfx::Insets(5, 0, 5, 0));
155 155
156 registrar_.Add(this, content::NOTIFICATION_WEB_CONTENTS_DESTROYED, 156 registrar_.Add(this, content::NOTIFICATION_WEB_CONTENTS_DESTROYED,
157 content::Source<WebContents>(web_contents)); 157 content::Source<WebContents>(web_contents));
158 } 158 }
159 159
160 ContentSettingBubbleContents::~ContentSettingBubbleContents() { 160 ContentSettingBubbleContents::~ContentSettingBubbleContents() {
161 STLDeleteValues(&media_menus_); 161 STLDeleteValues(&media_menus_);
162 } 162 }
163 163
164 gfx::Size ContentSettingBubbleContents::GetPreferredSize() { 164 gfx::Size ContentSettingBubbleContents::GetPreferredSize() {
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
483 int width = button->GetPreferredSize().width(); 483 int width = button->GetPreferredSize().width();
484 for (int i = 0; i < menu_model->GetItemCount(); ++i) { 484 for (int i = 0; i < menu_model->GetItemCount(); ++i) {
485 button->SetText(menu_model->GetLabelAt(i)); 485 button->SetText(menu_model->GetLabelAt(i));
486 width = std::max(width, button->GetPreferredSize().width()); 486 width = std::max(width, button->GetPreferredSize().width());
487 } 487 }
488 488
489 // Recover the title for the menu button. 489 // Recover the title for the menu button.
490 button->SetText(title); 490 button->SetText(title);
491 return width; 491 return width;
492 } 492 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698