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

Side by Side Diff: chrome/browser/ui/cocoa/tab_contents/sad_tab_view.h

Issue 7610011: Update Sad Tab help text and link. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Minor cleanup in SadTabController. Created 9 years, 4 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_UI_COCOA_TAB_CONTENTS_SAD_TAB_VIEW_H_ 5 #ifndef CHROME_BROWSER_UI_COCOA_TAB_CONTENTS_SAD_TAB_VIEW_H_
6 #define CHROME_BROWSER_UI_COCOA_TAB_CONTENTS_SAD_TAB_VIEW_H_ 6 #define CHROME_BROWSER_UI_COCOA_TAB_CONTENTS_SAD_TAB_VIEW_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/memory/scoped_nsobject.h" 9 #include "base/memory/scoped_nsobject.h"
10 #include "chrome/browser/ui/cocoa/base_view.h" 10 #include "chrome/browser/ui/cocoa/base_view.h"
11 11
12 #import <Cocoa/Cocoa.h> 12 #import <Cocoa/Cocoa.h>
13 13
14 @class HyperlinkButtonCell; 14 @class SadTabController;
15 15
16 // A view that displays the "sad tab" (aka crash page). 16 // A view that displays the "sad tab" (aka crash page).
17 @interface SadTabView : BaseView { 17 @interface SadTabView : BaseView {
18 @private 18 @private
19 IBOutlet NSImageView* image_; 19 IBOutlet NSImageView* image_;
20 IBOutlet NSTextField* title_; 20 IBOutlet NSTextField* title_;
21 IBOutlet NSTextField* message_; 21 IBOutlet NSTextField* message_;
22 IBOutlet NSButton* linkButton_; 22 IBOutlet NSTextField* helpPlaceholder_;
23 IBOutlet HyperlinkButtonCell* linkCell_;
24 23
25 scoped_nsobject<NSColor> backgroundColor_; 24 scoped_nsobject<NSColor> backgroundColor_;
26 NSSize messageSize_; 25 NSSize messageSize_;
26
27 // Text fields don't work as well with embedded links as text views, but
28 // text views cannot conveniently be created in IB. The xib file contains
29 // a text field |helpPlaceholder_| that's replaced by this text view |help_|
30 // in -awakeFromNib.
31 scoped_nsobject<NSTextView> help_;
32
33 // A weak reference to the parent controller.
34 SadTabController* controller_;
27 } 35 }
28 36
29 // Designated initializer is -initWithFrame: . 37 // Designated initializer is -initWithFrame: .
30 38
31 // Called by SadTabController to remove link button. 39 // Called by SadTabController to provide a weak refernce to the view's parent.
Avi (use Gerrit) 2011/08/12 01:07:48 drive-by: typo
msw 2011/08/30 04:09:06 Removed.
32 - (void)removeLinkButton; 40 - (void)setController:(SadTabController*)controller;
Nico 2011/08/12 02:29:56 You can make this an IBOutlet in interface builder
msw 2011/08/30 04:09:06 Done.
41
42 // Called by SadTabController to remove the help text and link.
43 - (void)removeHelpText;
44
45 // Sets |help_| based on |helpPlaceholder_|, sets |helpPlaceholder_| to nil.
46 - (void)initializeHelpText;
33 47
34 @end 48 @end
35 49
36 #endif // CHROME_BROWSER_UI_COCOA_TAB_CONTENTS_SAD_TAB_VIEW_H_ 50 #endif // CHROME_BROWSER_UI_COCOA_TAB_CONTENTS_SAD_TAB_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698