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

Side by Side Diff: chrome/browser/ui/gtk/fullscreen_exit_bubble_gtk.cc

Issue 9353010: Add FullscreenController::ToggleFullscreenModeWithExtension (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Show "An extension triggered full screen." when the extension's name is not available. 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) 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/gtk/fullscreen_exit_bubble_gtk.h" 5 #include "chrome/browser/ui/gtk/fullscreen_exit_bubble_gtk.h"
6 6
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "chrome/browser/ui/browser.h" 8 #include "chrome/browser/ui/browser.h"
9 #include "chrome/browser/ui/gtk/gtk_chrome_link_button.h" 9 #include "chrome/browser/ui/gtk/gtk_chrome_link_button.h"
10 #include "chrome/browser/ui/gtk/gtk_util.h" 10 #include "chrome/browser/ui/gtk/gtk_util.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 if (fullscreen_bubble::ShowButtonsForType(bubble_type)) { 50 if (fullscreen_bubble::ShowButtonsForType(bubble_type)) {
51 gtk_widget_hide(link_); 51 gtk_widget_hide(link_);
52 gtk_widget_hide(instruction_label_); 52 gtk_widget_hide(instruction_label_);
53 gtk_widget_show(allow_button_); 53 gtk_widget_show(allow_button_);
54 gtk_button_set_label(GTK_BUTTON(deny_button_), 54 gtk_button_set_label(GTK_BUTTON(deny_button_),
55 UTF16ToUTF8(GetCurrentDenyButtonText()).c_str()); 55 UTF16ToUTF8(GetCurrentDenyButtonText()).c_str());
56 gtk_widget_show(deny_button_); 56 gtk_widget_show(deny_button_);
57 } else { 57 } else {
58 bool link_visible = true; 58 bool link_visible = true;
59 string16 accelerator; 59 string16 accelerator;
60 if (bubble_type == FEB_TYPE_BROWSER_FULLSCREEN_EXIT_INSTRUCTION) { 60 if (bubble_type == FEB_TYPE_BROWSER_FULLSCREEN_EXIT_INSTRUCTION ||
61 bubble_type ==
62 FEB_TYPE_BROWSER_EXTENSION_FULLSCREEN_EXIT_INSTRUCTION) {
61 accelerator = l10n_util::GetStringUTF16(IDS_APP_F11_KEY); 63 accelerator = l10n_util::GetStringUTF16(IDS_APP_F11_KEY);
62 } else if (bubble_type == FEB_TYPE_FULLSCREEN_EXIT_INSTRUCTION) { 64 } else if (bubble_type == FEB_TYPE_FULLSCREEN_EXIT_INSTRUCTION) {
63 accelerator = l10n_util::GetStringUTF16(IDS_APP_ESC_KEY); 65 accelerator = l10n_util::GetStringUTF16(IDS_APP_ESC_KEY);
64 } else { 66 } else {
65 link_visible = false; 67 link_visible = false;
66 } 68 }
67 if (link_visible) { 69 if (link_visible) {
68 std::string exit_link_text( 70 std::string exit_link_text(
69 l10n_util::GetStringUTF8(IDS_EXIT_FULLSCREEN_MODE) + " " + 71 l10n_util::GetStringUTF8(IDS_EXIT_FULLSCREEN_MODE) + " " +
70 l10n_util::GetStringFUTF8(IDS_EXIT_FULLSCREEN_MODE_ACCELERATOR, 72 l10n_util::GetStringFUTF8(IDS_EXIT_FULLSCREEN_MODE_ACCELERATOR,
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 ToggleFullscreen(); 239 ToggleFullscreen();
238 } 240 }
239 241
240 void FullscreenExitBubbleGtk::OnAllowClicked(GtkWidget* button) { 242 void FullscreenExitBubbleGtk::OnAllowClicked(GtkWidget* button) {
241 Accept(); 243 Accept();
242 UpdateContent(url_, bubble_type_); 244 UpdateContent(url_, bubble_type_);
243 } 245 }
244 void FullscreenExitBubbleGtk::OnDenyClicked(GtkWidget* button) { 246 void FullscreenExitBubbleGtk::OnDenyClicked(GtkWidget* button) {
245 Cancel(); 247 Cancel();
246 } 248 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/fullscreen_exit_bubble_type.cc ('k') | chrome/browser/ui/views/fullscreen_exit_bubble_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698