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 "chrome/browser/infobars/infobar_tab_helper.h" | 8 #include "chrome/browser/infobars/infobar_tab_helper.h" |
9 #include "content/browser/renderer_host/render_view_host.h" | 9 #include "content/browser/renderer_host/render_view_host.h" |
10 #include "content/browser/tab_contents/tab_contents.h" | 10 #include "content/browser/tab_contents/tab_contents.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 #if defined(OS_WIN) && !defined(USE_AURA) | 54 #if defined(OS_WIN) |
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 #elif defined(USE_AURA) | |
60 // TODO(beng): | |
61 NOTIMPLEMENTED(); | |
62 #endif | 59 #endif |
63 return true; | 60 return true; |
64 } | 61 } |
65 | 62 |
66 string16 PluginInstallerInfoBarDelegate::GetLinkText() const { | 63 string16 PluginInstallerInfoBarDelegate::GetLinkText() const { |
67 return l10n_util::GetStringUTF16(IDS_PLUGININSTALLER_PROBLEMSINSTALLING); | 64 return l10n_util::GetStringUTF16(IDS_PLUGININSTALLER_PROBLEMSINSTALLING); |
68 } | 65 } |
69 | 66 |
70 bool PluginInstallerInfoBarDelegate::LinkClicked( | 67 bool PluginInstallerInfoBarDelegate::LinkClicked( |
71 WindowOpenDisposition disposition) { | 68 WindowOpenDisposition disposition) { |
72 owner()->tab_contents()->OpenURL(google_util::AppendGoogleLocaleParam(GURL( | 69 owner()->tab_contents()->OpenURL(google_util::AppendGoogleLocaleParam(GURL( |
73 "https://www.google.com/support/chrome/bin/answer.py?answer=142064")), | 70 "https://www.google.com/support/chrome/bin/answer.py?answer=142064")), |
74 GURL(), | 71 GURL(), |
75 (disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition, | 72 (disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition, |
76 content::PAGE_TRANSITION_LINK); | 73 content::PAGE_TRANSITION_LINK); |
77 return false; | 74 return false; |
78 } | 75 } |
OLD | NEW |