Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(169)

Side by Side Diff: chrome/browser/extensions/extension_install_ui.cc

Issue 174462: Linux Extensions Install Prompt (Closed)
Patch Set: test Created 11 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/gtk/extension_install_prompt_gtk.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/extensions/extension_install_ui.h" 5 #include "chrome/browser/extensions/extension_install_ui.h"
6 6
7 #include <map> 7 #include <map>
8 8
9 #include "app/l10n_util.h" 9 #include "app/l10n_util.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 28 matching lines...) Expand all
39 if (extension->IsTheme()) { 39 if (extension->IsTheme()) {
40 // Remember the current theme in case the user pressed undo. 40 // Remember the current theme in case the user pressed undo.
41 Extension* previous_theme = profile_->GetTheme(); 41 Extension* previous_theme = profile_->GetTheme();
42 if (previous_theme) 42 if (previous_theme)
43 previous_theme_id_ = previous_theme->id(); 43 previous_theme_id_ = previous_theme->id();
44 44
45 delegate->ContinueInstall(); 45 delegate->ContinueInstall();
46 return; 46 return;
47 } 47 }
48 48
49 #if defined(OS_WIN) 49 #if defined(OS_WIN) || defined(OS_LINUX)
50 ShowExtensionInstallPrompt(profile_, delegate, extension, install_icon); 50 ShowExtensionInstallPrompt(profile_, delegate, extension, install_icon);
51 51
52 #elif defined(OS_MACOSX) 52 #elif defined(OS_MACOSX)
53 // TODO(port): Implement nicer UI. 53 // TODO(port): Implement nicer UI.
54 // Using CoreFoundation to do this dialog is unimaginably lame but will do 54 // Using CoreFoundation to do this dialog is unimaginably lame but will do
55 // until the UI is redone. 55 // until the UI is redone.
56 scoped_cftyperef<CFStringRef> product_name( 56 scoped_cftyperef<CFStringRef> product_name(
57 base::SysWideToCFStringRef(l10n_util::GetString(IDS_PRODUCT_NAME))); 57 base::SysWideToCFStringRef(l10n_util::GetString(IDS_PRODUCT_NAME)));
58 CFOptionFlags response; 58 CFOptionFlags response;
59 if (kCFUserNotificationAlternateResponse == CFUserNotificationDisplayAlert( 59 if (kCFUserNotificationAlternateResponse == CFUserNotificationDisplayAlert(
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 129
130 // Then either replace that old one or add a new one. 130 // Then either replace that old one or add a new one.
131 InfoBarDelegate* new_delegate = new ThemePreviewInfobarDelegate(tab_contents, 131 InfoBarDelegate* new_delegate = new ThemePreviewInfobarDelegate(tab_contents,
132 new_theme->name(), previous_theme_id_); 132 new_theme->name(), previous_theme_id_);
133 133
134 if (old_delegate) 134 if (old_delegate)
135 tab_contents->ReplaceInfoBar(old_delegate, new_delegate); 135 tab_contents->ReplaceInfoBar(old_delegate, new_delegate);
136 else 136 else
137 tab_contents->AddInfoBar(new_delegate); 137 tab_contents->AddInfoBar(new_delegate);
138 } 138 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/gtk/extension_install_prompt_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698