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

Unified Diff: chrome/browser/ui/cocoa/tab_contents/sad_tab_mac.mm

Issue 2261793002: Bring the feedback button to the Mac sad tab (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Address second wave of comments, turn off feedback in non-Chrome builds Created 4 years, 3 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/tab_contents/sad_tab_mac.mm
diff --git a/chrome/browser/ui/cocoa/tab_contents/sad_tab_mac.mm b/chrome/browser/ui/cocoa/tab_contents/sad_tab_mac.mm
new file mode 100644
index 0000000000000000000000000000000000000000..436d98faf1098ff25817a6a77af180bc1a952fbc
--- /dev/null
+++ b/chrome/browser/ui/cocoa/tab_contents/sad_tab_mac.mm
@@ -0,0 +1,34 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#import "chrome/browser/ui/cocoa/tab_contents/sad_tab_view_cocoa.h"
+#include "chrome/browser/ui/sad_tab.h"
+#include "content/public/browser/web_contents.h"
+
+namespace {
+
+class SadTabCocoa : public chrome::SadTab {
+ public:
+ SadTabCocoa(content::WebContents* web_contents, chrome::SadTabKind kind)
+ : SadTab(web_contents, kind) {
+ NSView* web_contents_view = web_contents->GetNativeView();
+ sad_tab_view_ =
+ [[SadTabView alloc] initWithFrame:web_contents_view.bounds sadTab:this];
+ [web_contents_view addSubview:sad_tab_view_];
+ [sad_tab_view_ release];
+ }
+
+ ~SadTabCocoa() override { [sad_tab_view_ removeFromSuperview]; }
+
+ private:
+ // Owned by web_contents
+ SadTabView* sad_tab_view_;
+};
+
+} // namespace
+
+chrome::SadTab* chrome::SadTab::Create(content::WebContents* web_contents,
+ SadTabKind kind) {
+ return new SadTabCocoa(web_contents, kind);
+}

Powered by Google App Engine
This is Rietveld 408576698