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

Unified Diff: chrome/browser/ui/views/content_setting_bubble_contents.cc

Issue 1570153003: Use MacViews for ContentSettingBubbles. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixes for tapted Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698