OLD | NEW |
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 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
255 } | 255 } |
256 | 256 |
257 int BookmarkAppBubbleView::TitleStringId() { | 257 int BookmarkAppBubbleView::TitleStringId() { |
258 #if defined(OS_WIN) | 258 #if defined(OS_WIN) |
259 int string_id = IDS_ADD_TO_TASKBAR_BUBBLE_TITLE; | 259 int string_id = IDS_ADD_TO_TASKBAR_BUBBLE_TITLE; |
260 #else | 260 #else |
261 int string_id = IDS_ADD_TO_DESKTOP_BUBBLE_TITLE; | 261 int string_id = IDS_ADD_TO_DESKTOP_BUBBLE_TITLE; |
262 #endif | 262 #endif |
263 #if defined(USE_ASH) | 263 #if defined(USE_ASH) |
264 if (chrome::GetHostDesktopTypeForNativeWindow( | 264 if (chrome::GetHostDesktopTypeForNativeWindow( |
265 anchor_widget()->GetNativeWindow()) == | 265 anchor_widget()->GetNativeWindow()) == ui::HOST_DESKTOP_TYPE_ASH) { |
266 chrome::HOST_DESKTOP_TYPE_ASH) { | |
267 string_id = IDS_ADD_TO_SHELF_BUBBLE_TITLE; | 266 string_id = IDS_ADD_TO_SHELF_BUBBLE_TITLE; |
268 } | 267 } |
269 #endif | 268 #endif |
270 return string_id; | 269 return string_id; |
271 } | 270 } |
272 | 271 |
273 base::string16 BookmarkAppBubbleView::GetTrimmedTitle() { | 272 base::string16 BookmarkAppBubbleView::GetTrimmedTitle() { |
274 base::string16 title(title_tf_->text()); | 273 base::string16 title(title_tf_->text()); |
275 base::TrimWhitespace(title, base::TRIM_ALL, &title); | 274 base::TrimWhitespace(title, base::TRIM_ALL, &title); |
276 return title; | 275 return title; |
277 } | 276 } |
OLD | NEW |