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

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

Issue 371633002: LabelButton: cache the last computed preferred size (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 5 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/fullscreen_exit_bubble_views.h" 5 #include "chrome/browser/ui/views/fullscreen_exit_bubble_views.h"
6 6
7 #include "base/message_loop/message_loop.h" 7 #include "base/message_loop/message_loop.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "chrome/app/chrome_command_ids.h" 9 #include "chrome/app/chrome_command_ids.h"
10 #include "chrome/browser/chrome_notification_types.h" 10 #include "chrome/browser/chrome_notification_types.h"
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 const GURL& url, 218 const GURL& url,
219 FullscreenExitBubbleType bubble_type) { 219 FullscreenExitBubbleType bubble_type) {
220 DCHECK_NE(FEB_TYPE_NONE, bubble_type); 220 DCHECK_NE(FEB_TYPE_NONE, bubble_type);
221 221
222 message_label_->SetText(bubble_->GetCurrentMessageText()); 222 message_label_->SetText(bubble_->GetCurrentMessageText());
223 if (fullscreen_bubble::ShowButtonsForType(bubble_type)) { 223 if (fullscreen_bubble::ShowButtonsForType(bubble_type)) {
224 link_->SetVisible(false); 224 link_->SetVisible(false);
225 mouse_lock_exit_instruction_->SetVisible(false); 225 mouse_lock_exit_instruction_->SetVisible(false);
226 button_view_->SetVisible(true); 226 button_view_->SetVisible(true);
227 button_view_->deny_button()->SetText(bubble_->GetCurrentDenyButtonText()); 227 button_view_->deny_button()->SetText(bubble_->GetCurrentDenyButtonText());
228 button_view_->deny_button()->set_min_size(gfx::Size()); 228 button_view_->deny_button()->SetMinSize(gfx::Size());
229 } else { 229 } else {
230 bool link_visible = true; 230 bool link_visible = true;
231 base::string16 accelerator; 231 base::string16 accelerator;
232 if (bubble_type == FEB_TYPE_BROWSER_FULLSCREEN_EXIT_INSTRUCTION || 232 if (bubble_type == FEB_TYPE_BROWSER_FULLSCREEN_EXIT_INSTRUCTION ||
233 bubble_type == FEB_TYPE_BROWSER_EXTENSION_FULLSCREEN_EXIT_INSTRUCTION) { 233 bubble_type == FEB_TYPE_BROWSER_EXTENSION_FULLSCREEN_EXIT_INSTRUCTION) {
234 accelerator = browser_fullscreen_exit_accelerator_; 234 accelerator = browser_fullscreen_exit_accelerator_;
235 } else if (bubble_type == FEB_TYPE_FULLSCREEN_EXIT_INSTRUCTION) { 235 } else if (bubble_type == FEB_TYPE_FULLSCREEN_EXIT_INSTRUCTION) {
236 accelerator = l10n_util::GetStringUTF16(IDS_APP_ESC_KEY); 236 accelerator = l10n_util::GetStringUTF16(IDS_APP_ESC_KEY);
237 } else { 237 } else {
238 link_visible = false; 238 link_visible = false;
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
505 const content::NotificationDetails& details) { 505 const content::NotificationDetails& details) {
506 DCHECK_EQ(chrome::NOTIFICATION_FULLSCREEN_CHANGED, type); 506 DCHECK_EQ(chrome::NOTIFICATION_FULLSCREEN_CHANGED, type);
507 UpdateForImmersiveState(); 507 UpdateForImmersiveState();
508 } 508 }
509 509
510 void FullscreenExitBubbleViews::OnWidgetVisibilityChanged( 510 void FullscreenExitBubbleViews::OnWidgetVisibilityChanged(
511 views::Widget* widget, 511 views::Widget* widget,
512 bool visible) { 512 bool visible) {
513 UpdateMouseWatcher(); 513 UpdateMouseWatcher();
514 } 514 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/content_setting_bubble_contents.cc ('k') | chrome/browser/ui/views/location_bar/search_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698