diff options
author | kuan@chromium.org <kuan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-10 18:51:33 +0000 |
---|---|---|
committer | kuan@chromium.org <kuan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-10 18:51:33 +0000 |
commit | 62cf690a77564be902cf481803a9a7e3d52f7c55 (patch) | |
tree | 3792385594c7eaf77294a7fae3dacaa3ada4c3d4 /chrome/browser/views/sad_tab_view.h | |
parent | e3615577169f4e84cdf274493d876fea060020f9 (diff) | |
download | chromium_src-62cf690a77564be902cf481803a9a7e3d52f7c55.zip chromium_src-62cf690a77564be902cf481803a9a7e3d52f7c55.tar.gz chromium_src-62cf690a77564be902cf481803a9a7e3d52f7c55.tar.bz2 |
implement "Learn more" link in "Aw snap" page.
this changelist is only for windows.
BUG=21726
TEST=verify that "Learn More" link shows up centralized beneath crash message and when clicked, opens the url specified in bug.
Review URL: http://codereview.chromium.org/377016
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31573 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/sad_tab_view.h')
-rw-r--r-- | chrome/browser/views/sad_tab_view.h | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/chrome/browser/views/sad_tab_view.h b/chrome/browser/views/sad_tab_view.h index 65ed6fb..fe1c7aa 100644 --- a/chrome/browser/views/sad_tab_view.h +++ b/chrome/browser/views/sad_tab_view.h @@ -7,6 +7,7 @@ #include "app/gfx/font.h" #include "base/basictypes.h" +#include "views/controls/link.h" #include "views/view.h" class SkBitmap; @@ -18,15 +19,9 @@ class SkBitmap; // A views::View subclass used to render the presentation of the crashed // "sad tab" in the browser window when a renderer is destroyed unnaturally. // -// Note that since this view is not (currently) part of a Container or -// RootView hierarchy, it cannot respond to events or contain controls that -// do, right now it is used simply to render. Adding an extra Container to -// TabContents seemed like a lot of complexity. Ideally, perhaps TabContents' -// view portion would itself become a Container in the future, then event -// processing will work. -// /////////////////////////////////////////////////////////////////////////////// -class SadTabView : public views::View { +class SadTabView : public views::View, + public views::LinkController { public: SadTabView(); virtual ~SadTabView() {} @@ -35,6 +30,9 @@ class SadTabView : public views::View { virtual void Paint(gfx::Canvas* canvas); virtual void Layout(); + // Overridden from views::LinkController: + virtual void LinkActivated(views::Link* source, int event_flags); + private: static void InitClass(); @@ -46,11 +44,14 @@ class SadTabView : public views::View { static std::wstring message_; static int title_width_; + views::Link* learn_more_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 link_bounds_; DISALLOW_COPY_AND_ASSIGN(SadTabView); }; |