Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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) { | |
|
Evan Stade
2012/02/13 20:08:00
4 more space of indent
hashimoto
2012/02/14 00:59:55
Done.
| |
| 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 Loading... | |
| 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 } |
| OLD | NEW |