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

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

Issue 12114045: Broke ContentSettingBubbleModelTest.Plugins on Android. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/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/content_settings/host_content_settings_map.h" 9 #include "chrome/browser/content_settings/host_content_settings_map.h"
10 #include "chrome/browser/google/google_util.h" 10 #include "chrome/browser/google/google_util.h"
11 #include "chrome/browser/lifetime/application_lifetime.h" 11 #include "chrome/browser/lifetime/application_lifetime.h"
12 #include "chrome/browser/plugins/chrome_plugin_service_filter.h"
13 #include "chrome/browser/plugins/plugin_metadata.h" 12 #include "chrome/browser/plugins/plugin_metadata.h"
14 #include "chrome/browser/profiles/profile.h" 13 #include "chrome/browser/profiles/profile.h"
15 #include "chrome/common/render_messages.h" 14 #include "chrome/common/render_messages.h"
16 #include "chrome/common/url_constants.h" 15 #include "chrome/common/url_constants.h"
17 #include "content/public/browser/render_process_host.h"
18 #include "content/public/browser/render_view_host.h" 16 #include "content/public/browser/render_view_host.h"
19 #include "content/public/browser/user_metrics.h" 17 #include "content/public/browser/user_metrics.h"
20 #include "content/public/browser/web_contents.h" 18 #include "content/public/browser/web_contents.h"
21 #include "grit/generated_resources.h" 19 #include "grit/generated_resources.h"
22 #include "grit/locale_settings.h" 20 #include "grit/locale_settings.h"
23 #include "grit/theme_resources.h" 21 #include "grit/theme_resources.h"
24 #include "ui/base/l10n/l10n_util.h" 22 #include "ui/base/l10n/l10n_util.h"
25 #include "ui/base/resource/resource_bundle.h" 23 #include "ui/base/resource/resource_bundle.h"
26 24
27 #if defined(OS_WIN) 25 #if defined(OS_WIN)
(...skipping 29 matching lines...) Expand all
57 (disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition, 55 (disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition,
58 content::PAGE_TRANSITION_LINK, 56 content::PAGE_TRANSITION_LINK,
59 false); 57 false);
60 owner()->GetWebContents()->OpenURL(params); 58 owner()->GetWebContents()->OpenURL(params);
61 return false; 59 return false;
62 } 60 }
63 61
64 void PluginInfoBarDelegate::LoadBlockedPlugins() { 62 void PluginInfoBarDelegate::LoadBlockedPlugins() {
65 content::WebContents* web_contents = owner()->GetWebContents(); 63 content::WebContents* web_contents = owner()->GetWebContents();
66 if (web_contents) { 64 if (web_contents) {
67 content::RenderViewHost* host = web_contents->GetRenderViewHost(); 65 web_contents->Send(new ChromeViewMsg_LoadBlockedPlugins(
68 ChromePluginServiceFilter::GetInstance()->AuthorizeAllPlugins( 66 web_contents->GetRoutingID(), identifier_));
69 host->GetProcess()->GetID());
70 host->Send(new ChromeViewMsg_LoadBlockedPlugins(
71 host->GetRoutingID(), identifier_));
72 } 67 }
73 } 68 }
74 69
75 gfx::Image* PluginInfoBarDelegate::GetIcon() const { 70 gfx::Image* PluginInfoBarDelegate::GetIcon() const {
76 return &ResourceBundle::GetSharedInstance().GetNativeImageNamed( 71 return &ResourceBundle::GetSharedInstance().GetNativeImageNamed(
77 IDR_INFOBAR_PLUGIN_INSTALL); 72 IDR_INFOBAR_PLUGIN_INSTALL);
78 } 73 }
79 74
80 string16 PluginInfoBarDelegate::GetLinkText() const { 75 string16 PluginInfoBarDelegate::GetLinkText() const {
81 return l10n_util::GetStringUTF16(IDS_LEARN_MORE); 76 return l10n_util::GetStringUTF16(IDS_LEARN_MORE);
(...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after
550 "https://support.google.com/chrome/?p=ib_display_in_desktop" : 545 "https://support.google.com/chrome/?p=ib_display_in_desktop" :
551 "https://support.google.com/chrome/?p=ib_redirect_to_desktop"), 546 "https://support.google.com/chrome/?p=ib_redirect_to_desktop"),
552 Referrer(), 547 Referrer(),
553 (disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition, 548 (disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition,
554 content::PAGE_TRANSITION_LINK, false); 549 content::PAGE_TRANSITION_LINK, false);
555 owner()->GetWebContents()->OpenURL(params); 550 owner()->GetWebContents()->OpenURL(params);
556 return false; 551 return false;
557 } 552 }
558 #endif // defined(OS_WIN) 553 #endif // defined(OS_WIN)
559 #endif // defined(ENABLE_PLUGIN_INSTALLATION) 554 #endif // defined(ENABLE_PLUGIN_INSTALLATION)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698