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

Side by Side Diff: chrome/browser/ui/gtk/content_setting_bubble_gtk.cc

Issue 9006036: Create an API around PluginService and use it from Chrome. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years 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
« no previous file with comments | « chrome/browser/ui/cocoa/drag_util.mm ('k') | chrome/browser/ui/pdf/pdf_unsupported_feature.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/gtk/content_setting_bubble_gtk.h" 5 #include "chrome/browser/ui/gtk/content_setting_bubble_gtk.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/i18n/rtl.h" 11 #include "base/i18n/rtl.h"
12 #include "base/utf_string_conversions.h" 12 #include "base/utf_string_conversions.h"
13 #include "chrome/browser/content_settings/host_content_settings_map.h" 13 #include "chrome/browser/content_settings/host_content_settings_map.h"
14 #include "chrome/browser/profiles/profile.h" 14 #include "chrome/browser/profiles/profile.h"
15 #include "chrome/browser/ui/content_settings/content_setting_bubble_model.h" 15 #include "chrome/browser/ui/content_settings/content_setting_bubble_model.h"
16 #include "chrome/browser/ui/gtk/gtk_chrome_link_button.h" 16 #include "chrome/browser/ui/gtk/gtk_chrome_link_button.h"
17 #include "chrome/browser/ui/gtk/gtk_theme_service.h" 17 #include "chrome/browser/ui/gtk/gtk_theme_service.h"
18 #include "chrome/browser/ui/gtk/gtk_util.h" 18 #include "chrome/browser/ui/gtk/gtk_util.h"
19 #include "chrome/common/content_settings.h" 19 #include "chrome/common/content_settings.h"
20 #include "content/browser/plugin_service.h"
21 #include "content/browser/tab_contents/tab_contents.h" 20 #include "content/browser/tab_contents/tab_contents.h"
22 #include "content/public/browser/notification_source.h" 21 #include "content/public/browser/notification_source.h"
23 #include "content/public/browser/notification_types.h" 22 #include "content/public/browser/notification_types.h"
23 #include "content/public/browser/plugin_service.h"
24 #include "grit/generated_resources.h" 24 #include "grit/generated_resources.h"
25 #include "grit/ui_resources.h" 25 #include "grit/ui_resources.h"
26 #include "ui/base/gtk/gtk_hig_constants.h" 26 #include "ui/base/gtk/gtk_hig_constants.h"
27 #include "ui/base/l10n/l10n_util.h" 27 #include "ui/base/l10n/l10n_util.h"
28 #include "ui/base/text/text_elider.h" 28 #include "ui/base/text/text_elider.h"
29 #include "ui/gfx/gtk_util.h" 29 #include "ui/gfx/gtk_util.h"
30 30
31 using content::PluginService;
32
31 namespace { 33 namespace {
32 34
33 // Padding between content and edge of bubble. 35 // Padding between content and edge of bubble.
34 const int kContentBorder = 7; 36 const int kContentBorder = 7;
35 37
36 // The maximum width of a title entry in the content box. We elide anything 38 // The maximum width of a title entry in the content box. We elide anything
37 // longer than this. 39 // longer than this.
38 const int kMaxLinkPixelSize = 500; 40 const int kMaxLinkPixelSize = 500;
39 41
40 std::string BuildElidedText(const std::string& input) { 42 std::string BuildElidedText(const std::string& input) {
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 307
306 void ContentSettingBubbleGtk::OnCustomLinkClicked(GtkWidget* button) { 308 void ContentSettingBubbleGtk::OnCustomLinkClicked(GtkWidget* button) {
307 content_setting_bubble_model_->OnCustomLinkClicked(); 309 content_setting_bubble_model_->OnCustomLinkClicked();
308 Close(); 310 Close();
309 } 311 }
310 312
311 void ContentSettingBubbleGtk::OnManageLinkClicked(GtkWidget* button) { 313 void ContentSettingBubbleGtk::OnManageLinkClicked(GtkWidget* button) {
312 content_setting_bubble_model_->OnManageLinkClicked(); 314 content_setting_bubble_model_->OnManageLinkClicked();
313 Close(); 315 Close();
314 } 316 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/drag_util.mm ('k') | chrome/browser/ui/pdf/pdf_unsupported_feature.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698