| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <gtk/gtk.h> | 5 #include <gtk/gtk.h> |
| 6 | 6 |
| 7 #include "base/string_util.h" | 7 #include "base/string_util.h" |
| 8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
| 9 #include "chrome/browser/extensions/extension_install_dialog.h" | 9 #include "chrome/browser/extensions/extension_install_dialog.h" |
| 10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 219 } | 219 } |
| 220 | 220 |
| 221 gtk_widget_destroy(dialog_); | 221 gtk_widget_destroy(dialog_); |
| 222 delete this; | 222 delete this; |
| 223 } | 223 } |
| 224 | 224 |
| 225 void ExtensionInstallDialog::OnStoreLinkClick(GtkWidget* sender) { | 225 void ExtensionInstallDialog::OnStoreLinkClick(GtkWidget* sender) { |
| 226 GURL store_url( | 226 GURL store_url( |
| 227 extension_urls::GetWebstoreItemDetailURLPrefix() + extension_->id()); | 227 extension_urls::GetWebstoreItemDetailURLPrefix() + extension_->id()); |
| 228 BrowserList::GetLastActive()->OpenURL(OpenURLParams( | 228 BrowserList::GetLastActive()->OpenURL(OpenURLParams( |
| 229 store_url, GURL(), NEW_FOREGROUND_TAB, content::PAGE_TRANSITION_LINK, | 229 store_url, content::Referrer(), NEW_FOREGROUND_TAB, |
| 230 false)); | 230 content::PAGE_TRANSITION_LINK, false)); |
| 231 | 231 |
| 232 OnResponse(dialog_, GTK_RESPONSE_CLOSE); | 232 OnResponse(dialog_, GTK_RESPONSE_CLOSE); |
| 233 } | 233 } |
| 234 | 234 |
| 235 } // namespace | 235 } // namespace |
| 236 | 236 |
| 237 void ShowExtensionInstallDialogImpl( | 237 void ShowExtensionInstallDialogImpl( |
| 238 Profile* profile, | 238 Profile* profile, |
| 239 ExtensionInstallUI::Delegate* delegate, | 239 ExtensionInstallUI::Delegate* delegate, |
| 240 const Extension* extension, | 240 const Extension* extension, |
| (...skipping 11 matching lines...) Expand all Loading... |
| 252 delegate->InstallUIAbort(false); | 252 delegate->InstallUIAbort(false); |
| 253 return; | 253 return; |
| 254 } | 254 } |
| 255 | 255 |
| 256 new ExtensionInstallDialog(browser_window->window(), | 256 new ExtensionInstallDialog(browser_window->window(), |
| 257 delegate, | 257 delegate, |
| 258 extension, | 258 extension, |
| 259 icon, | 259 icon, |
| 260 prompt); | 260 prompt); |
| 261 } | 261 } |
| OLD | NEW |