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

Unified Diff: chrome/browser/ui/views/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: Use views::GridLayout, address Cocoa comments. 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/sad_tab_view.h
diff --git a/chrome/browser/ui/views/sad_tab_view.h b/chrome/browser/ui/views/sad_tab_view.h
index 573e58c6e6ec6edc7ed2855936f1acb30b30de6e..26285076c7f0227f724f6383eb4799686006f1fe 100644
--- a/chrome/browser/ui/views/sad_tab_view.h
+++ b/chrome/browser/ui/views/sad_tab_view.h
@@ -7,18 +7,21 @@
#pragma once
#include "base/basictypes.h"
-#include "base/string16.h"
-#include "ui/gfx/rect.h"
+#include "base/memory/scoped_ptr.h"
#include "views/controls/link_listener.h"
#include "views/view.h"
-class SkBitmap;
class TabContents;
namespace gfx {
class Font;
}
+namespace views {
+class ImageView;
+class Label;
+}
+
///////////////////////////////////////////////////////////////////////////////
//
// SadTabView
@@ -41,36 +44,31 @@ class SadTabView : public views::View,
virtual ~SadTabView();
// Overridden from views::View:
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
virtual void Layout() OVERRIDE;
// Overridden from views::LinkListener:
virtual void LinkClicked(views::Link* source, int event_flags) OVERRIDE;
- private:
- // Assorted resources for display.
- SkBitmap* sad_tab_bitmap_;
- gfx::Font* title_font_;
- gfx::Font* message_font_;
- string16 title_;
- string16 message_;
- int title_width_;
+ protected:
+ // Overridden from views::View:
+ virtual void ViewHierarchyChanged(bool is_add,
+ views::View* parent,
+ views::View* child) OVERRIDE;
+ virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
+ private:
TabContents* tab_contents_;
- views::Link* learn_more_link_;
- views::Link* feedback_link_;
-
- // Regions within the display for different components, populated by
- // Layout().
- gfx::Rect icon_bounds_;
- gfx::Rect title_bounds_;
- gfx::Rect message_bounds_;
- gfx::Rect learn_more_bounds_;
- gfx::Rect feedback_bounds_;
-
Kind kind_;
bool painted_;
+ views::ImageView* image_;
+ views::Label* title_;
+ views::Label* message_;
+ views::Label* help_prefix_;
+ views::Link* help_link_;
+ views::Label* help_suffix_;
+ views::Link* feedback_link_;
+
DISALLOW_COPY_AND_ASSIGN(SadTabView);
};

Powered by Google App Engine
This is Rietveld 408576698