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

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

Issue 1906433002: Views: Add to desktop dialog is now modal. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « chrome/browser/ui/views/extensions/bookmark_app_confirmation_view.h ('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_confirmation_view.h" 5 #include "chrome/browser/ui/views/extensions/bookmark_app_confirmation_view.h"
6 6
7 #include "base/callback_helpers.h" 7 #include "base/callback_helpers.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 "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 AddChildView(title_tf_); 97 AddChildView(title_tf_);
98 layout->SetFlexForView(title_tf_, 1); 98 layout->SetFlexForView(title_tf_, 1);
99 99
100 title_tf_->SelectAll(true); 100 title_tf_->SelectAll(true);
101 } 101 }
102 102
103 views::View* BookmarkAppConfirmationView::GetInitiallyFocusedView() { 103 views::View* BookmarkAppConfirmationView::GetInitiallyFocusedView() {
104 return title_tf_; 104 return title_tf_;
105 } 105 }
106 106
107 ui::ModalType BookmarkAppConfirmationView::GetModalType() const {
108 return ui::MODAL_TYPE_WINDOW;
109 }
110
107 base::string16 BookmarkAppConfirmationView::GetWindowTitle() const { 111 base::string16 BookmarkAppConfirmationView::GetWindowTitle() const {
108 #if defined(USE_ASH) 112 #if defined(USE_ASH)
109 int ids = IDS_ADD_TO_SHELF_BUBBLE_TITLE; 113 int ids = IDS_ADD_TO_SHELF_BUBBLE_TITLE;
110 #else 114 #else
111 int ids = IDS_ADD_TO_DESKTOP_BUBBLE_TITLE; 115 int ids = IDS_ADD_TO_DESKTOP_BUBBLE_TITLE;
112 #endif 116 #endif
113 117
114 return l10n_util::GetStringUTF16(ids); 118 return l10n_util::GetStringUTF16(ids);
115 } 119 }
116 120
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 const base::string16& new_contents) { 163 const base::string16& new_contents) {
160 DCHECK_EQ(title_tf_, sender); 164 DCHECK_EQ(title_tf_, sender);
161 GetDialogClientView()->UpdateDialogButtons(); 165 GetDialogClientView()->UpdateDialogButtons();
162 } 166 }
163 167
164 base::string16 BookmarkAppConfirmationView::GetTrimmedTitle() const { 168 base::string16 BookmarkAppConfirmationView::GetTrimmedTitle() const {
165 base::string16 title(title_tf_->text()); 169 base::string16 title(title_tf_->text());
166 base::TrimWhitespace(title, base::TRIM_ALL, &title); 170 base::TrimWhitespace(title, base::TRIM_ALL, &title);
167 return title; 171 return title;
168 } 172 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/extensions/bookmark_app_confirmation_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698