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

Side by Side Diff: chrome/browser/plugins/plugin_observer.cc

Issue 10993064: Make using WebContentsUserData simpler. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 2 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/plugins/plugin_observer.h" 5 #include "chrome/browser/plugins/plugin_observer.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 28 matching lines...) Expand all
39 39
40 #if defined(OS_WIN) 40 #if defined(OS_WIN)
41 #include "base/win/metro.h" 41 #include "base/win/metro.h"
42 #endif 42 #endif
43 43
44 using content::OpenURLParams; 44 using content::OpenURLParams;
45 using content::PluginService; 45 using content::PluginService;
46 using content::Referrer; 46 using content::Referrer;
47 using content::WebContents; 47 using content::WebContents;
48 48
49 int PluginObserver::kUserDataKey; 49 DEFINE_WEB_CONTENTS_USER_DATA_KEY(PluginObserver)
50 50
51 namespace { 51 namespace {
52 52
53 #if defined(ENABLE_PLUGIN_INSTALLATION) 53 #if defined(ENABLE_PLUGIN_INSTALLATION)
54 54
55 // ConfirmInstallDialogDelegate ------------------------------------------------ 55 // ConfirmInstallDialogDelegate ------------------------------------------------
56 56
57 class ConfirmInstallDialogDelegate : public TabModalConfirmDialogDelegate, 57 class ConfirmInstallDialogDelegate : public TabModalConfirmDialogDelegate,
58 public WeakPluginInstallerObserver { 58 public WeakPluginInstallerObserver {
59 public: 59 public:
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 InfoBarTabHelper* infobar_helper = tab_contents->infobar_tab_helper(); 348 InfoBarTabHelper* infobar_helper = tab_contents->infobar_tab_helper();
349 infobar_helper->AddInfoBar(new SimpleAlertInfoBarDelegate( 349 infobar_helper->AddInfoBar(new SimpleAlertInfoBarDelegate(
350 infobar_helper, 350 infobar_helper,
351 &ResourceBundle::GetSharedInstance().GetNativeImageNamed( 351 &ResourceBundle::GetSharedInstance().GetNativeImageNamed(
352 IDR_INFOBAR_PLUGIN_CRASHED), 352 IDR_INFOBAR_PLUGIN_CRASHED),
353 l10n_util::GetStringFUTF16(IDS_PLUGIN_INITIALIZATION_ERROR_PROMPT, 353 l10n_util::GetStringFUTF16(IDS_PLUGIN_INITIALIZATION_ERROR_PROMPT,
354 plugin_name), 354 plugin_name),
355 true /* auto_expire */)); 355 true /* auto_expire */));
356 } 356 }
357 357
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698