Chromium Code Reviews| Index: chrome/browser/ui/views/content_setting_bubble_contents.cc |
| diff --git a/chrome/browser/ui/views/content_setting_bubble_contents.cc b/chrome/browser/ui/views/content_setting_bubble_contents.cc |
| index 6f454c1466cffd994c9a48afddc44bf66f18c925..12b5210277f4751291ffd08edc3c2bc88983f4d6 100644 |
| --- a/chrome/browser/ui/views/content_setting_bubble_contents.cc |
| +++ b/chrome/browser/ui/views/content_setting_bubble_contents.cc |
| @@ -15,6 +15,7 @@ |
| #include "base/strings/utf_string_conversions.h" |
| #include "chrome/browser/plugins/plugin_finder.h" |
| #include "chrome/browser/plugins/plugin_metadata.h" |
| +#include "chrome/browser/ui/browser_dialogs.h" |
| #include "chrome/browser/ui/content_settings/content_setting_bubble_model.h" |
| #include "chrome/browser/ui/content_settings/content_setting_media_menu_model.h" |
| #include "chrome/browser/ui/views/browser_dialogs.h" |
| @@ -498,3 +499,20 @@ void ContentSettingBubbleContents::UpdateMenuButtonSizes() { |
| i->first->SetMaxSize(gfx::Size(menu_width, 0)); |
| } |
| } |
| + |
| +namespace chrome { |
| + |
| +void ContentSettingBubbleViewsBridge::Show(gfx::NativeView parent_view, |
|
tapted
2016/01/11 23:21:38
Can this go in c/b/ui/views/browser_dialog_views_m
Elly Fong-Jones
2016/01/12 14:09:59
Done.
|
| + ContentSettingBubbleModel* model, |
| + content::WebContents* web_contents, |
| + const gfx::Point& anchor) { |
| + ContentSettingBubbleContents* contents = |
| + new ContentSettingBubbleContents(model, web_contents, nullptr, |
| + views::BubbleBorder::Arrow::TOP_RIGHT); |
| + contents->set_parent_window(parent_view); |
| + contents->SetAnchorRect(gfx::Rect(anchor, gfx::Size())); |
| + // TODO(ellyjones): why doesn't this leak the bubble? |
|
tapted
2016/01/11 23:21:39
Yeah it's spooky isn't it.. Probably CreateBubble
Elly Fong-Jones
2016/01/12 14:09:59
Ick. Ack.
|
| + views::BubbleDelegateView::CreateBubble(contents)->Show(); |
| +} |
| + |
| +} // namespace chrome |