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

Unified Diff: chrome/browser/ui/cocoa/location_bar/content_setting_bubble_views_mac.mm

Issue 1570153003: Use MacViews for ContentSettingBubbles. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/cocoa/location_bar/content_setting_bubble_views_mac.mm
diff --git a/chrome/browser/ui/cocoa/location_bar/content_setting_bubble_views_mac.mm b/chrome/browser/ui/cocoa/location_bar/content_setting_bubble_views_mac.mm
new file mode 100644
index 0000000000000000000000000000000000000000..56c5862edb1500503e89972df1d2bccda53a21f1
--- /dev/null
+++ b/chrome/browser/ui/cocoa/location_bar/content_setting_bubble_views_mac.mm
@@ -0,0 +1,24 @@
+// Copyright (c) 2016 The Chromium Authors. All rights reserved.
tapted 2016/01/11 02:50:57 can this be .cc instead of .mm?
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/ui/cocoa/location_bar/content_setting_bubble_views_mac.h"
tapted 2016/01/11 02:50:57 nit: blank line after the #include for a .cc's cor
+#include "chrome/browser/ui/views/content_setting_bubble_contents.h"
+
+ContentSettingBubbleBridge::ContentSettingBubbleBridge(
+ ContentSettingBubbleModel* model,
+ content::WebContents* web_contents,
+ const gfx::Point& anchor) {
+ ContentSettingBubbleContents* contents =
+ new ContentSettingBubbleContents(model,
+ web_contents, NULL,
tapted 2016/01/11 02:50:57 nit: NULL -> nullptr
+ views::BubbleBorder::Arrow::TOP_RIGHT);
tapted 2016/01/11 02:50:57 I *think* CreateBubbleWidget(..) in ui/views/bubbl
+ contents->SetExplicitAnchorRect(gfx::Rect(anchor, gfx::Size(0, 0)));
tapted 2016/01/11 02:50:57 nit: Size(0, 0) -> Size()
+ bubble_widget_ = views::BubbleDelegateView::CreateBubble(contents);
+}
+
+ContentSettingBubbleBridge::~ContentSettingBubbleBridge() {}
+
+void ContentSettingBubbleBridge::Show() {
+ bubble_widget_->Show();
+}

Powered by Google App Engine
This is Rietveld 408576698