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

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

Issue 1697263002: Remove HostDesktopType from some extensions files (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@metro-mode-28
Patch Set: unused var Created 4 years, 10 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
« no previous file with comments | « chrome/browser/extensions/bookmark_app_helper.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/numerics/safe_conversions.h" 7 #include "base/numerics/safe_conversions.h"
8 #include "base/strings/string16.h" 8 #include "base/strings/string16.h"
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 } 254 }
255 255
256 GetWidget()->Close(); 256 GetWidget()->Close();
257 } 257 }
258 258
259 void BookmarkAppBubbleView::UpdateAddButtonState() { 259 void BookmarkAppBubbleView::UpdateAddButtonState() {
260 add_button_->SetEnabled(!GetTrimmedTitle().empty()); 260 add_button_->SetEnabled(!GetTrimmedTitle().empty());
261 } 261 }
262 262
263 int BookmarkAppBubbleView::TitleStringId() { 263 int BookmarkAppBubbleView::TitleStringId() {
264 int string_id = IDS_ADD_TO_DESKTOP_BUBBLE_TITLE;
265 #if defined(USE_ASH) 264 #if defined(USE_ASH)
266 if (chrome::GetHostDesktopTypeForNativeWindow( 265 return IDS_ADD_TO_SHELF_BUBBLE_TITLE;
267 anchor_widget()->GetNativeWindow()) == 266 #else
268 chrome::HOST_DESKTOP_TYPE_ASH) { 267 return IDS_ADD_TO_DESKTOP_BUBBLE_TITLE;
269 string_id = IDS_ADD_TO_SHELF_BUBBLE_TITLE;
270 }
271 #endif 268 #endif
272 return string_id;
273 } 269 }
274 270
275 base::string16 BookmarkAppBubbleView::GetTrimmedTitle() { 271 base::string16 BookmarkAppBubbleView::GetTrimmedTitle() {
276 base::string16 title(title_tf_->text()); 272 base::string16 title(title_tf_->text());
277 base::TrimWhitespace(title, base::TRIM_ALL, &title); 273 base::TrimWhitespace(title, base::TRIM_ALL, &title);
278 return title; 274 return title;
279 } 275 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/bookmark_app_helper.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698