| 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/extensions/bundle_installed_bubble_gtk.h" | 5 #include "chrome/browser/ui/gtk/extensions/bundle_installed_bubble_gtk.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 bubble_(NULL) { | 55 bubble_(NULL) { |
| 56 AddRef(); // Balanced in Close(). | 56 AddRef(); // Balanced in Close(). |
| 57 ShowInternal(bundle); | 57 ShowInternal(bundle); |
| 58 } | 58 } |
| 59 | 59 |
| 60 BundleInstalledBubbleGtk::~BundleInstalledBubbleGtk() {} | 60 BundleInstalledBubbleGtk::~BundleInstalledBubbleGtk() {} |
| 61 | 61 |
| 62 void BundleInstalledBubbleGtk::ShowInternal(const BundleInstaller* bundle) { | 62 void BundleInstalledBubbleGtk::ShowInternal(const BundleInstaller* bundle) { |
| 63 BrowserWindowGtk* browser_window = | 63 BrowserWindowGtk* browser_window = |
| 64 BrowserWindowGtk::GetBrowserWindowForNativeWindow( | 64 BrowserWindowGtk::GetBrowserWindowForNativeWindow( |
| 65 browser_->window()->GetNativeHandle()); | 65 browser_->window()->GetNativeWindow()); |
| 66 | 66 |
| 67 GtkThemeService* theme_provider = GtkThemeService::GetFrom( | 67 GtkThemeService* theme_provider = GtkThemeService::GetFrom( |
| 68 browser_->profile()); | 68 browser_->profile()); |
| 69 | 69 |
| 70 // Anchor the bubble to the wrench menu. | 70 // Anchor the bubble to the wrench menu. |
| 71 GtkWidget* reference_widget = | 71 GtkWidget* reference_widget = |
| 72 browser_window->GetToolbar()->GetAppMenuButton(); | 72 browser_window->GetToolbar()->GetAppMenuButton(); |
| 73 | 73 |
| 74 GtkWidget* bubble_content = gtk_hbox_new(FALSE, kHorizontalColumnSpacing); | 74 GtkWidget* bubble_content = gtk_hbox_new(FALSE, kHorizontalColumnSpacing); |
| 75 gtk_container_set_border_width( | 75 gtk_container_set_border_width( |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 Release(); // Balanced in BundleInstalledBubbleGtk(). | 145 Release(); // Balanced in BundleInstalledBubbleGtk(). |
| 146 } | 146 } |
| 147 | 147 |
| 148 void BundleInstalledBubbleGtk::OnButtonClick(GtkWidget* button, | 148 void BundleInstalledBubbleGtk::OnButtonClick(GtkWidget* button, |
| 149 BundleInstalledBubbleGtk* bubble) { | 149 BundleInstalledBubbleGtk* bubble) { |
| 150 if (button == bubble->close_button_->widget()) | 150 if (button == bubble->close_button_->widget()) |
| 151 bubble->bubble_->Close(); | 151 bubble->bubble_->Close(); |
| 152 else | 152 else |
| 153 NOTREACHED(); | 153 NOTREACHED(); |
| 154 } | 154 } |
| OLD | NEW |