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

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: Clean up some comments, replace DLOG_ASSERT with DCHECK, move an #include to the right spot. 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 explicit SadTabCocoa(content::WebContents* web_contents,
Nico 2016/08/30 22:49:10 we don't usually use explicit on ctors with != 1 a
Sidney San Martín 2016/08/30 23:06:47 I think the explicit may have been a holdover from
14 chrome::SadTabKind kind)
15 : SadTab(web_contents, kind) {
16 NSView* web_contents_view = web_contents->GetNativeView();
17 sad_tab_view_ =
18 [[SadTabView alloc] initWithFrame:web_contents_view.bounds sadTab:this];
19 [web_contents_view addSubview:sad_tab_view_];
20 [sad_tab_view_ release];
21 }
22
23 ~SadTabCocoa() override { [sad_tab_view_ removeFromSuperview]; }
24
25 private:
26 SadTabView* sad_tab_view_;
Nico 2016/08/30 22:49:10 add "// Owned by web_contents", comment why that's
Sidney San Martín 2016/08/30 23:06:47 I'll add a comment on ownership. The destructor us
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