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 "chrome/browser/plugin_installer_infobar_delegate.h" | 5 #include "chrome/browser/plugin_installer_infobar_delegate.h" |
6 | 6 |
7 #include "chrome/browser/google/google_util.h" | 7 #include "chrome/browser/google/google_util.h" |
8 #include "content/browser/renderer_host/render_view_host.h" | 8 #include "content/browser/renderer_host/render_view_host.h" |
9 #include "content/browser/tab_contents/tab_contents.h" | 9 #include "content/browser/tab_contents/tab_contents.h" |
10 #include "content/common/view_messages.h" | 10 #include "content/common/view_messages.h" |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 } | 44 } |
45 | 45 |
46 string16 PluginInstallerInfoBarDelegate::GetButtonLabel( | 46 string16 PluginInstallerInfoBarDelegate::GetButtonLabel( |
47 InfoBarButton button) const { | 47 InfoBarButton button) const { |
48 DCHECK_EQ(BUTTON_OK, button); | 48 DCHECK_EQ(BUTTON_OK, button); |
49 return l10n_util::GetStringUTF16(IDS_PLUGININSTALLER_INSTALLPLUGIN_BUTTON); | 49 return l10n_util::GetStringUTF16(IDS_PLUGININSTALLER_INSTALLPLUGIN_BUTTON); |
50 } | 50 } |
51 | 51 |
52 bool PluginInstallerInfoBarDelegate::Accept() { | 52 bool PluginInstallerInfoBarDelegate::Accept() { |
53 // TODO(PORT) for other platforms. | 53 // TODO(PORT) for other platforms. |
54 #ifdef OS_WIN | 54 #if defined(OS_WIN) && !defined(USE_AURA) |
55 ::PostMessage(window_, | 55 ::PostMessage(window_, |
56 webkit::npapi::default_plugin::kInstallMissingPluginMessage, | 56 webkit::npapi::default_plugin::kInstallMissingPluginMessage, |
57 0, | 57 0, |
58 0); | 58 0); |
59 #endif // OS_WIN | 59 #elif defined(USE_AURA) |
| 60 // TODO(beng): |
| 61 NOTIMPLEMENTED(); |
| 62 #endif |
60 return true; | 63 return true; |
61 } | 64 } |
62 | 65 |
63 string16 PluginInstallerInfoBarDelegate::GetLinkText() const { | 66 string16 PluginInstallerInfoBarDelegate::GetLinkText() const { |
64 return l10n_util::GetStringUTF16(IDS_PLUGININSTALLER_PROBLEMSINSTALLING); | 67 return l10n_util::GetStringUTF16(IDS_PLUGININSTALLER_PROBLEMSINSTALLING); |
65 } | 68 } |
66 | 69 |
67 bool PluginInstallerInfoBarDelegate::LinkClicked( | 70 bool PluginInstallerInfoBarDelegate::LinkClicked( |
68 WindowOpenDisposition disposition) { | 71 WindowOpenDisposition disposition) { |
69 tab_contents_->OpenURL(google_util::AppendGoogleLocaleParam(GURL( | 72 tab_contents_->OpenURL(google_util::AppendGoogleLocaleParam(GURL( |
70 "http://www.google.com/support/chrome/bin/answer.py?answer=95697&topic=" | 73 "http://www.google.com/support/chrome/bin/answer.py?answer=95697&topic=" |
71 "14687")), GURL(), | 74 "14687")), GURL(), |
72 (disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition, | 75 (disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition, |
73 PageTransition::LINK); | 76 PageTransition::LINK); |
74 return false; | 77 return false; |
75 } | 78 } |
OLD | NEW |