OLD | NEW |
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/ui/content_settings/content_setting_bubble_model.h" | 5 #include "chrome/browser/ui/content_settings/content_setting_bubble_model.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/feature_list.h" | 10 #include "base/feature_list.h" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 #include "components/subresource_filter/content/browser/content_subresource_filt
er_driver_factory.h" | 43 #include "components/subresource_filter/content/browser/content_subresource_filt
er_driver_factory.h" |
44 #include "components/url_formatter/elide_url.h" | 44 #include "components/url_formatter/elide_url.h" |
45 #include "content/public/browser/notification_service.h" | 45 #include "content/public/browser/notification_service.h" |
46 #include "content/public/browser/render_frame_host.h" | 46 #include "content/public/browser/render_frame_host.h" |
47 #include "content/public/browser/render_process_host.h" | 47 #include "content/public/browser/render_process_host.h" |
48 #include "content/public/browser/render_view_host.h" | 48 #include "content/public/browser/render_view_host.h" |
49 #include "content/public/browser/user_metrics.h" | 49 #include "content/public/browser/user_metrics.h" |
50 #include "content/public/browser/web_contents.h" | 50 #include "content/public/browser/web_contents.h" |
51 #include "content/public/browser/web_contents_delegate.h" | 51 #include "content/public/browser/web_contents_delegate.h" |
52 #include "content/public/common/origin_util.h" | 52 #include "content/public/common/origin_util.h" |
| 53 #include "ppapi/features/features.h" |
53 #include "ui/base/l10n/l10n_util.h" | 54 #include "ui/base/l10n/l10n_util.h" |
54 #include "ui/base/resource/resource_bundle.h" | 55 #include "ui/base/resource/resource_bundle.h" |
55 #include "ui/resources/grit/ui_resources.h" | 56 #include "ui/resources/grit/ui_resources.h" |
56 | 57 |
57 using base::UserMetricsAction; | 58 using base::UserMetricsAction; |
58 using content::WebContents; | 59 using content::WebContents; |
59 using content_settings::SettingInfo; | 60 using content_settings::SettingInfo; |
60 using content_settings::SettingSource; | 61 using content_settings::SettingSource; |
61 using content_settings::SETTING_SOURCE_USER; | 62 using content_settings::SETTING_SOURCE_USER; |
62 using content_settings::SETTING_SOURCE_NONE; | 63 using content_settings::SETTING_SOURCE_NONE; |
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
552 content_settings::PLUGINS_ACTION_CLICKED_RUN_ALL_PLUGINS_THIS_TIME); | 553 content_settings::PLUGINS_ACTION_CLICKED_RUN_ALL_PLUGINS_THIS_TIME); |
553 | 554 |
554 RunPluginsOnPage(); | 555 RunPluginsOnPage(); |
555 } | 556 } |
556 | 557 |
557 void ContentSettingPluginBubbleModel::RunPluginsOnPage() { | 558 void ContentSettingPluginBubbleModel::RunPluginsOnPage() { |
558 // Web contents can be NULL if the tab was closed while the plugins | 559 // Web contents can be NULL if the tab was closed while the plugins |
559 // settings bubble is visible. | 560 // settings bubble is visible. |
560 if (!web_contents()) | 561 if (!web_contents()) |
561 return; | 562 return; |
562 #if defined(ENABLE_PLUGINS) | 563 #if BUILDFLAG(ENABLE_PLUGINS) |
563 // TODO(bauerb): We should send the identifiers of blocked plugins here. | 564 // TODO(bauerb): We should send the identifiers of blocked plugins here. |
564 ChromePluginServiceFilter::GetInstance()->AuthorizeAllPlugins( | 565 ChromePluginServiceFilter::GetInstance()->AuthorizeAllPlugins( |
565 web_contents(), true, std::string()); | 566 web_contents(), true, std::string()); |
566 #endif | 567 #endif |
567 set_custom_link_enabled(false); | 568 set_custom_link_enabled(false); |
568 TabSpecificContentSettings::FromWebContents(web_contents()) | 569 TabSpecificContentSettings::FromWebContents(web_contents()) |
569 ->set_load_plugins_link_enabled(false); | 570 ->set_load_plugins_link_enabled(false); |
570 } | 571 } |
571 | 572 |
572 // ContentSettingPopupBubbleModel ---------------------------------------------- | 573 // ContentSettingPopupBubbleModel ---------------------------------------------- |
(...skipping 895 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1468 ContentSettingMediaStreamBubbleModel* | 1469 ContentSettingMediaStreamBubbleModel* |
1469 ContentSettingBubbleModel::AsMediaStreamBubbleModel() { | 1470 ContentSettingBubbleModel::AsMediaStreamBubbleModel() { |
1470 // In general, bubble models might not inherit from the media bubble model. | 1471 // In general, bubble models might not inherit from the media bubble model. |
1471 return nullptr; | 1472 return nullptr; |
1472 } | 1473 } |
1473 | 1474 |
1474 ContentSettingSubresourceFilterBubbleModel* | 1475 ContentSettingSubresourceFilterBubbleModel* |
1475 ContentSettingBubbleModel::AsSubresourceFilterBubbleModel() { | 1476 ContentSettingBubbleModel::AsSubresourceFilterBubbleModel() { |
1476 return nullptr; | 1477 return nullptr; |
1477 } | 1478 } |
OLD | NEW |