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

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

Issue 12315023: Merge 180159 (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1364/src/
Patch Set: Created 7 years, 10 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_infobar_delegates.h" 5 #include "chrome/browser/plugins/plugin_infobar_delegates.h"
6 6
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "chrome/browser/api/infobars/infobar_service.h" 8 #include "chrome/browser/api/infobars/infobar_service.h"
9 #include "chrome/browser/chrome_plugin_service_filter.h"
9 #include "chrome/browser/content_settings/host_content_settings_map.h" 10 #include "chrome/browser/content_settings/host_content_settings_map.h"
10 #include "chrome/browser/google/google_util.h" 11 #include "chrome/browser/google/google_util.h"
11 #include "chrome/browser/lifetime/application_lifetime.h" 12 #include "chrome/browser/lifetime/application_lifetime.h"
12 #include "chrome/browser/plugins/plugin_metadata.h" 13 #include "chrome/browser/plugins/plugin_metadata.h"
13 #include "chrome/browser/profiles/profile.h" 14 #include "chrome/browser/profiles/profile.h"
14 #include "chrome/common/render_messages.h" 15 #include "chrome/common/render_messages.h"
15 #include "chrome/common/url_constants.h" 16 #include "chrome/common/url_constants.h"
17 #include "content/public/browser/render_process_host.h"
16 #include "content/public/browser/render_view_host.h" 18 #include "content/public/browser/render_view_host.h"
17 #include "content/public/browser/user_metrics.h" 19 #include "content/public/browser/user_metrics.h"
18 #include "content/public/browser/web_contents.h" 20 #include "content/public/browser/web_contents.h"
19 #include "grit/generated_resources.h" 21 #include "grit/generated_resources.h"
20 #include "grit/locale_settings.h" 22 #include "grit/locale_settings.h"
21 #include "grit/theme_resources.h" 23 #include "grit/theme_resources.h"
22 #include "ui/base/l10n/l10n_util.h" 24 #include "ui/base/l10n/l10n_util.h"
23 #include "ui/base/resource/resource_bundle.h" 25 #include "ui/base/resource/resource_bundle.h"
24 26
25 #if defined(OS_WIN) 27 #if defined(OS_WIN)
(...skipping 26 matching lines...) Expand all
52 (disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition, 54 (disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition,
53 content::PAGE_TRANSITION_LINK, 55 content::PAGE_TRANSITION_LINK,
54 false); 56 false);
55 owner()->GetWebContents()->OpenURL(params); 57 owner()->GetWebContents()->OpenURL(params);
56 return false; 58 return false;
57 } 59 }
58 60
59 void PluginInfoBarDelegate::LoadBlockedPlugins() { 61 void PluginInfoBarDelegate::LoadBlockedPlugins() {
60 content::WebContents* web_contents = owner()->GetWebContents(); 62 content::WebContents* web_contents = owner()->GetWebContents();
61 if (web_contents) { 63 if (web_contents) {
62 web_contents->Send(new ChromeViewMsg_LoadBlockedPlugins( 64 content::RenderViewHost* host = web_contents->GetRenderViewHost();
63 web_contents->GetRoutingID(), identifier_)); 65 ChromePluginServiceFilter::GetInstance()->AuthorizeAllPlugins(
66 host->GetProcess()->GetID());
67 host->Send(new ChromeViewMsg_LoadBlockedPlugins(
68 host->GetRoutingID(), identifier_));
64 } 69 }
65 } 70 }
66 71
67 gfx::Image* PluginInfoBarDelegate::GetIcon() const { 72 gfx::Image* PluginInfoBarDelegate::GetIcon() const {
68 return &ResourceBundle::GetSharedInstance().GetNativeImageNamed( 73 return &ResourceBundle::GetSharedInstance().GetNativeImageNamed(
69 IDR_INFOBAR_PLUGIN_INSTALL); 74 IDR_INFOBAR_PLUGIN_INSTALL);
70 } 75 }
71 76
72 string16 PluginInfoBarDelegate::GetLinkText() const { 77 string16 PluginInfoBarDelegate::GetLinkText() const {
73 return l10n_util::GetStringUTF16(IDS_LEARN_MORE); 78 return l10n_util::GetStringUTF16(IDS_LEARN_MORE);
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after
510 WindowOpenDisposition disposition) { 515 WindowOpenDisposition disposition) {
511 OpenURLParams params( 516 OpenURLParams params(
512 learn_more_url_, Referrer(), 517 learn_more_url_, Referrer(),
513 (disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition, 518 (disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition,
514 content::PAGE_TRANSITION_LINK, false); 519 content::PAGE_TRANSITION_LINK, false);
515 owner()->GetWebContents()->OpenURL(params); 520 owner()->GetWebContents()->OpenURL(params);
516 return false; 521 return false;
517 } 522 }
518 #endif // defined(OS_WIN) 523 #endif // defined(OS_WIN)
519 #endif // defined(ENABLE_PLUGIN_INSTALLATION) 524 #endif // defined(ENABLE_PLUGIN_INSTALLATION)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698