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

Side by Side 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: Ditch a pointless |explicit|, add a comment on SadTabView ownership. 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 unified diff | Download patch
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #import "chrome/browser/ui/cocoa/tab_contents/sad_tab_view_cocoa.h"
6 #include "chrome/browser/ui/sad_tab.h"
7 #include "content/public/browser/web_contents.h"
8
9 namespace {
10
11 class SadTabCocoa : public chrome::SadTab {
12 public:
13 SadTabCocoa(content::WebContents* web_contents, chrome::SadTabKind kind)
14 : SadTab(web_contents, kind) {
15 NSView* web_contents_view = web_contents->GetNativeView();
16 sad_tab_view_ =
17 [[SadTabView alloc] initWithFrame:web_contents_view.bounds sadTab:this];
18 [web_contents_view addSubview:sad_tab_view_];
19 [sad_tab_view_ release];
20 }
21
22 ~SadTabCocoa() override { [sad_tab_view_ removeFromSuperview]; }
23
24 private:
25 // Owned by web_contents
26 SadTabView* sad_tab_view_;
27 };
28
29 } // namespace
30
31 chrome::SadTab* chrome::SadTab::Create(content::WebContents* web_contents,
32 SadTabKind kind) {
33 return new SadTabCocoa(web_contents, kind);
34 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698