| OLD | NEW |
| 1 // Copyright (c) 2011 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.h" | 7 #include "base/message_loop.h" |
| 8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
| 9 #include "chrome/app/chrome_command_ids.h" | 9 #include "chrome/app/chrome_command_ids.h" |
| 10 #include "googleurl/src/gurl.h" | 10 #include "googleurl/src/gurl.h" |
| 11 #include "grit/generated_resources.h" | 11 #include "grit/generated_resources.h" |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 message_label_->SetText(bubble_->GetCurrentMessageText()); | 211 message_label_->SetText(bubble_->GetCurrentMessageText()); |
| 212 if (fullscreen_bubble::ShowButtonsForType(bubble_type)) { | 212 if (fullscreen_bubble::ShowButtonsForType(bubble_type)) { |
| 213 link_->SetVisible(false); | 213 link_->SetVisible(false); |
| 214 mouse_lock_exit_instruction_->SetVisible(false); | 214 mouse_lock_exit_instruction_->SetVisible(false); |
| 215 button_view_->SetVisible(true); | 215 button_view_->SetVisible(true); |
| 216 button_view_->deny_button()->SetText(bubble_->GetCurrentDenyButtonText()); | 216 button_view_->deny_button()->SetText(bubble_->GetCurrentDenyButtonText()); |
| 217 button_view_->deny_button()->ClearMaxTextSize(); | 217 button_view_->deny_button()->ClearMaxTextSize(); |
| 218 } else { | 218 } else { |
| 219 bool link_visible = true; | 219 bool link_visible = true; |
| 220 string16 accelerator; | 220 string16 accelerator; |
| 221 if (bubble_type == FEB_TYPE_BROWSER_FULLSCREEN_EXIT_INSTRUCTION) { | 221 if (bubble_type == FEB_TYPE_BROWSER_FULLSCREEN_EXIT_INSTRUCTION || |
| 222 bubble_type == FEB_TYPE_BROWSER_EXTENSION_FULLSCREEN_EXIT_INSTRUCTION) { |
| 222 accelerator = browser_fullscreen_exit_accelerator_; | 223 accelerator = browser_fullscreen_exit_accelerator_; |
| 223 } else if (bubble_type == FEB_TYPE_FULLSCREEN_EXIT_INSTRUCTION) { | 224 } else if (bubble_type == FEB_TYPE_FULLSCREEN_EXIT_INSTRUCTION) { |
| 224 accelerator = l10n_util::GetStringUTF16(IDS_APP_ESC_KEY); | 225 accelerator = l10n_util::GetStringUTF16(IDS_APP_ESC_KEY); |
| 225 } else { | 226 } else { |
| 226 link_visible = false; | 227 link_visible = false; |
| 227 } | 228 } |
| 228 #if !defined(OS_CHROMEOS) | 229 #if !defined(OS_CHROMEOS) |
| 229 if (link_visible) { | 230 if (link_visible) { |
| 230 link_->SetText( | 231 link_->SetText( |
| 231 l10n_util::GetStringUTF16(IDS_EXIT_FULLSCREEN_MODE) + | 232 l10n_util::GetStringUTF16(IDS_EXIT_FULLSCREEN_MODE) + |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 381 } | 382 } |
| 382 | 383 |
| 383 bool FullscreenExitBubbleViews::IsAnimating() { | 384 bool FullscreenExitBubbleViews::IsAnimating() { |
| 384 return size_animation_->GetCurrentValue() != 0; | 385 return size_animation_->GetCurrentValue() != 0; |
| 385 } | 386 } |
| 386 | 387 |
| 387 void FullscreenExitBubbleViews::StartWatchingMouseIfNecessary() { | 388 void FullscreenExitBubbleViews::StartWatchingMouseIfNecessary() { |
| 388 if (!fullscreen_bubble::ShowButtonsForType(bubble_type_)) | 389 if (!fullscreen_bubble::ShowButtonsForType(bubble_type_)) |
| 389 StartWatchingMouse(); | 390 StartWatchingMouse(); |
| 390 } | 391 } |
| OLD | NEW |