| 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/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
| 8 #include "chrome/browser/chrome_notification_types.h" | 8 #include "chrome/browser/chrome_notification_types.h" |
| 9 #include "chrome/browser/ui/browser.h" | 9 #include "chrome/browser/ui/browser.h" |
| 10 #include "chrome/browser/ui/gtk/gtk_chrome_link_button.h" | 10 #include "chrome/browser/ui/gtk/gtk_chrome_link_button.h" |
| 11 #include "chrome/browser/ui/gtk/gtk_theme_service.h" | 11 #include "chrome/browser/ui/gtk/gtk_theme_service.h" |
| 12 #include "chrome/browser/ui/gtk/gtk_util.h" | 12 #include "chrome/browser/ui/gtk/gtk_util.h" |
| 13 #include "chrome/browser/ui/gtk/rounded_window.h" | 13 #include "chrome/browser/ui/gtk/rounded_window.h" |
| 14 #include "content/public/browser/notification_source.h" | 14 #include "content/public/browser/notification_source.h" |
| 15 #include "content/public/browser/render_widget_host_view.h" | 15 #include "content/public/browser/render_widget_host_view.h" |
| 16 #include "grit/generated_resources.h" | 16 #include "grit/generated_resources.h" |
| 17 #include "grit/ui_strings.h" | 17 #include "grit/ui_strings.h" |
| 18 #include "ui/base/gtk/gtk_floating_container.h" | 18 #include "ui/base/gtk/gtk_floating_container.h" |
| 19 #include "ui/base/gtk/gtk_hig_constants.h" | 19 #include "ui/base/gtk/gtk_hig_constants.h" |
| 20 #include "ui/base/l10n/l10n_util.h" | 20 #include "ui/base/l10n/l10n_util.h" |
| 21 | 21 |
| 22 namespace { | 22 namespace { |
| 23 | 23 |
| 24 const GdkColor kBackgroundColor = GDK_COLOR_RGB(0xff, 0xff, 0xff); | 24 const GdkColor kBackgroundColor = GDK_COLOR_RGB(0xff, 0xff, 0xff); |
| 25 const GdkColor kFrameColor = GDK_COLOR_RGB(0x63, 0x63, 0x63); | 25 const GdkColor kFrameColor = GDK_COLOR_RGB(0x63, 0x63, 0x63); |
| 26 const int kMiddlePaddingPx = 30; | |
| 27 | 26 |
| 28 } // namespace | 27 } // namespace |
| 29 | 28 |
| 30 FullscreenExitBubbleGtk::FullscreenExitBubbleGtk( | 29 FullscreenExitBubbleGtk::FullscreenExitBubbleGtk( |
| 31 GtkFloatingContainer* container, | 30 GtkFloatingContainer* container, |
| 32 Browser* browser, | 31 Browser* browser, |
| 33 const GURL& url, | 32 const GURL& url, |
| 34 FullscreenExitBubbleType bubble_type) | 33 FullscreenExitBubbleType bubble_type) |
| 35 : FullscreenExitBubble(browser, url, bubble_type), | 34 : FullscreenExitBubble(browser, url, bubble_type), |
| 36 theme_service_(NULL), | 35 theme_service_(NULL), |
| (...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 268 void FullscreenExitBubbleGtk::Observe( | 267 void FullscreenExitBubbleGtk::Observe( |
| 269 int type, | 268 int type, |
| 270 const content::NotificationSource& source, | 269 const content::NotificationSource& source, |
| 271 const content::NotificationDetails& details) { | 270 const content::NotificationDetails& details) { |
| 272 DCHECK_EQ(type, chrome::NOTIFICATION_BROWSER_THEME_CHANGED); | 271 DCHECK_EQ(type, chrome::NOTIFICATION_BROWSER_THEME_CHANGED); |
| 273 if (theme_service_->UsingNativeTheme()) | 272 if (theme_service_->UsingNativeTheme()) |
| 274 gtk_widget_modify_bg(bubble_, GTK_STATE_NORMAL, NULL); | 273 gtk_widget_modify_bg(bubble_, GTK_STATE_NORMAL, NULL); |
| 275 else | 274 else |
| 276 gtk_widget_modify_bg(bubble_, GTK_STATE_NORMAL, &kBackgroundColor); | 275 gtk_widget_modify_bg(bubble_, GTK_STATE_NORMAL, &kBackgroundColor); |
| 277 } | 276 } |
| OLD | NEW |