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

Side by Side Diff: chrome/browser/ui/views/extensions/bookmark_app_bubble_view.cc

Issue 273223002: views: Make view::Views::GetPreferredSize() const. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More compile fix for ToT Created 6 years, 7 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/extensions/bookmark_app_bubble_view.h" 5 #include "chrome/browser/ui/views/extensions/bookmark_app_bubble_view.h"
6 6
7 #include "base/strings/string16.h" 7 #include "base/strings/string16.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "chrome/browser/extensions/app_icon_loader_impl.h" 9 #include "chrome/browser/extensions/app_icon_loader_impl.h"
10 #include "chrome/browser/extensions/bookmark_app_helper.h" 10 #include "chrome/browser/extensions/bookmark_app_helper.h"
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 205
206 bool BookmarkAppBubbleView::AcceleratorPressed( 206 bool BookmarkAppBubbleView::AcceleratorPressed(
207 const ui::Accelerator& accelerator) { 207 const ui::Accelerator& accelerator) {
208 if (accelerator.key_code() == ui::VKEY_RETURN) { 208 if (accelerator.key_code() == ui::VKEY_RETURN) {
209 HandleButtonPressed(add_button_); 209 HandleButtonPressed(add_button_);
210 } 210 }
211 211
212 return BubbleDelegateView::AcceleratorPressed(accelerator); 212 return BubbleDelegateView::AcceleratorPressed(accelerator);
213 } 213 }
214 214
215 gfx::Size BookmarkAppBubbleView::GetMinimumSize() { 215 gfx::Size BookmarkAppBubbleView::GetMinimumSize() const {
216 gfx::Size size(views::BubbleDelegateView::GetPreferredSize()); 216 gfx::Size size(views::BubbleDelegateView::GetPreferredSize());
217 size.SetToMax(gfx::Size(kMinBubbleWidth, 0)); 217 size.SetToMax(gfx::Size(kMinBubbleWidth, 0));
218 return size; 218 return size;
219 } 219 }
220 220
221 void BookmarkAppBubbleView::ButtonPressed(views::Button* sender, 221 void BookmarkAppBubbleView::ButtonPressed(views::Button* sender,
222 const ui::Event& event) { 222 const ui::Event& event) {
223 HandleButtonPressed(sender); 223 HandleButtonPressed(sender);
224 } 224 }
225 225
(...skipping 28 matching lines...) Expand all
254 if (extension && base::UTF8ToUTF16(extension->name()) == title_tf_->text()) 254 if (extension && base::UTF8ToUTF16(extension->name()) == title_tf_->text())
255 return; 255 return;
256 256
257 // Reinstall the app with an updated name. 257 // Reinstall the app with an updated name.
258 WebApplicationInfo install_info(web_app_info_); 258 WebApplicationInfo install_info(web_app_info_);
259 install_info.title = title_tf_->text(); 259 install_info.title = title_tf_->text();
260 260
261 extensions::CreateOrUpdateBookmarkApp(profile_->GetExtensionService(), 261 extensions::CreateOrUpdateBookmarkApp(profile_->GetExtensionService(),
262 install_info); 262 install_info);
263 } 263 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698