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

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

Issue 9328037: Add fullscreen state support for chrome.windows (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix default case handling Created 8 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 | Annotate | Revision Log
OLDNEW
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
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 ==
223 FEB_TYPE_BROWSER_EXTENSION_TRIGGERED_FULLSCREEN_EXIT_INSTRUCTION) {
222 accelerator = browser_fullscreen_exit_accelerator_; 224 accelerator = browser_fullscreen_exit_accelerator_;
223 } else if (bubble_type == FEB_TYPE_FULLSCREEN_EXIT_INSTRUCTION) { 225 } else if (bubble_type == FEB_TYPE_FULLSCREEN_EXIT_INSTRUCTION) {
224 accelerator = l10n_util::GetStringUTF16(IDS_APP_ESC_KEY); 226 accelerator = l10n_util::GetStringUTF16(IDS_APP_ESC_KEY);
225 } else { 227 } else {
226 link_visible = false; 228 link_visible = false;
227 } 229 }
228 #if !defined(OS_CHROMEOS) 230 #if !defined(OS_CHROMEOS)
229 if (link_visible) { 231 if (link_visible) {
230 link_->SetText( 232 link_->SetText(
231 l10n_util::GetStringUTF16(IDS_EXIT_FULLSCREEN_MODE) + 233 l10n_util::GetStringUTF16(IDS_EXIT_FULLSCREEN_MODE) +
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 } 383 }
382 384
383 bool FullscreenExitBubbleViews::IsAnimating() { 385 bool FullscreenExitBubbleViews::IsAnimating() {
384 return size_animation_->GetCurrentValue() != 0; 386 return size_animation_->GetCurrentValue() != 0;
385 } 387 }
386 388
387 void FullscreenExitBubbleViews::StartWatchingMouseIfNecessary() { 389 void FullscreenExitBubbleViews::StartWatchingMouseIfNecessary() {
388 if (!fullscreen_bubble::ShowButtonsForType(bubble_type_)) 390 if (!fullscreen_bubble::ShowButtonsForType(bubble_type_))
389 StartWatchingMouse(); 391 StartWatchingMouse();
390 } 392 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698