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 "base/basictypes.h" | 5 #include "base/basictypes.h" |
6 #include "base/compiler_specific.h" | 6 #include "base/compiler_specific.h" |
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 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
292 } | 292 } |
293 | 293 |
294 views::View* ExtensionInstallDialogView::GetContentsView() { | 294 views::View* ExtensionInstallDialogView::GetContentsView() { |
295 return this; | 295 return this; |
296 } | 296 } |
297 | 297 |
298 void ExtensionInstallDialogView::LinkClicked(views::Link* source, | 298 void ExtensionInstallDialogView::LinkClicked(views::Link* source, |
299 int event_flags) { | 299 int event_flags) { |
300 GURL store_url( | 300 GURL store_url( |
301 extension_urls::GetWebstoreItemDetailURLPrefix() + extension_->id()); | 301 extension_urls::GetWebstoreItemDetailURLPrefix() + extension_->id()); |
302 BrowserList::GetLastActive()-> | 302 BrowserList::GetLastActive()->OpenURL( |
303 OpenURL(store_url, GURL(), NEW_FOREGROUND_TAB, PageTransition::LINK); | 303 store_url, GURL(), NEW_FOREGROUND_TAB, content::PAGE_TRANSITION_LINK); |
304 GetWidget()->Close(); | 304 GetWidget()->Close(); |
305 } | 305 } |
306 | 306 |
307 void ShowExtensionInstallDialog( | 307 void ShowExtensionInstallDialog( |
308 Profile* profile, | 308 Profile* profile, |
309 ExtensionInstallUI::Delegate* delegate, | 309 ExtensionInstallUI::Delegate* delegate, |
310 const Extension* extension, | 310 const Extension* extension, |
311 SkBitmap* icon, | 311 SkBitmap* icon, |
312 const ExtensionInstallUI::Prompt& prompt) { | 312 const ExtensionInstallUI::Prompt& prompt) { |
313 #if defined(OS_CHROMEOS) | 313 #if defined(OS_CHROMEOS) |
(...skipping 14 matching lines...) Expand all Loading... |
328 } | 328 } |
329 | 329 |
330 ExtensionInstallDialogView* dialog = new ExtensionInstallDialogView( | 330 ExtensionInstallDialogView* dialog = new ExtensionInstallDialogView( |
331 delegate, extension, icon, prompt); | 331 delegate, extension, icon, prompt); |
332 | 332 |
333 views::Widget* window = browser::CreateViewsWindow( | 333 views::Widget* window = browser::CreateViewsWindow( |
334 browser_window->GetNativeHandle(), dialog); | 334 browser_window->GetNativeHandle(), dialog); |
335 | 335 |
336 window->Show(); | 336 window->Show(); |
337 } | 337 } |
OLD | NEW |