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

Side by Side Diff: chrome/browser/plugin_installer.cc

Issue 4088: Move a bunch of stuff out of WebContents. I removed a bunch of render view ho... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years, 3 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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/app/theme/theme_resources.h" 5 #include "chrome/app/theme/theme_resources.h"
6 #include "chrome/browser/plugin_installer.h" 6 #include "chrome/browser/plugin_installer.h"
7 #include "base/string_util.h" 7 #include "base/string_util.h"
8 #include "chrome/common/l10n_util.h" 8 #include "chrome/common/l10n_util.h"
9 #include "chrome/common/resource_bundle.h" 9 #include "chrome/common/resource_bundle.h"
10 #include "webkit/default_plugin/default_plugin_shared.h" 10 #include "webkit/default_plugin/default_plugin_shared.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 current_bar_->BeginClose(); 52 current_bar_->BeginClose();
53 } 53 }
54 54
55 void PluginInstaller::OnBarDestroy(InfoBarConfirmView* bar) { 55 void PluginInstaller::OnBarDestroy(InfoBarConfirmView* bar) {
56 if (current_bar_ == bar) 56 if (current_bar_ == bar)
57 current_bar_ = NULL; 57 current_bar_ = NULL;
58 } 58 }
59 59
60 void PluginInstaller::OnOKButtonPressed() { 60 void PluginInstaller::OnOKButtonPressed() {
61 current_bar_->BeginClose(); 61 current_bar_->BeginClose();
62 web_contents_->InstallMissingPlugin(); 62 web_contents_->render_view_host()->InstallMissingPlugin();
63 } 63 }
64 64
65 PluginInstaller::PluginInstallerBar 65 PluginInstaller::PluginInstallerBar
66 ::PluginInstallerBar(PluginInstaller* plugin_installer) 66 ::PluginInstallerBar(PluginInstaller* plugin_installer)
67 : plugin_installer_(plugin_installer), 67 : plugin_installer_(plugin_installer),
68 InfoBarConfirmView( 68 InfoBarConfirmView(
69 l10n_util::GetString(IDS_PLUGININSTALLER_MISSINGPLUGIN_PROMPT)) { 69 l10n_util::GetString(IDS_PLUGININSTALLER_MISSINGPLUGIN_PROMPT)) {
70 SetOKButtonLabel( 70 SetOKButtonLabel(
71 l10n_util::GetString(IDS_PLUGININSTALLER_INSTALLPLUGIN_BUTTON)); 71 l10n_util::GetString(IDS_PLUGININSTALLER_INSTALLPLUGIN_BUTTON));
72 RemoveCancelButton(); 72 RemoveCancelButton();
73 ResourceBundle &rb = ResourceBundle::GetSharedInstance(); 73 ResourceBundle &rb = ResourceBundle::GetSharedInstance();
74 SetIcon(*rb.GetBitmapNamed(IDR_INFOBAR_PLUGIN_INSTALL)); 74 SetIcon(*rb.GetBitmapNamed(IDR_INFOBAR_PLUGIN_INSTALL));
75 } 75 }
76 76
77 PluginInstaller::PluginInstallerBar::~PluginInstallerBar() { 77 PluginInstaller::PluginInstallerBar::~PluginInstallerBar() {
78 plugin_installer_->OnBarDestroy(this); 78 plugin_installer_->OnBarDestroy(this);
79 } 79 }
80 80
81 void PluginInstaller::PluginInstallerBar::OKButtonPressed() { 81 void PluginInstaller::PluginInstallerBar::OKButtonPressed() {
82 plugin_installer_->OnOKButtonPressed(); 82 plugin_installer_->OnOKButtonPressed();
83 } 83 }
84 84
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698