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

Side by Side Diff: chrome/browser/ui/views/hung_renderer_view.h

Issue 11011002: Switch FaviconTabHelper to use WebContentsUserData. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 8 years, 2 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_VIEWS_HUNG_RENDERER_VIEW_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_HUNG_RENDERER_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_HUNG_RENDERER_VIEW_H_ 6 #define CHROME_BROWSER_UI_VIEWS_HUNG_RENDERER_VIEW_H_
7 7
8 #include "base/memory/scoped_vector.h" 8 #include "base/memory/scoped_vector.h"
9 #include "chrome/browser/favicon/favicon_tab_helper.h"
9 #include "chrome/browser/ui/tab_contents/tab_contents.h" 10 #include "chrome/browser/ui/tab_contents/tab_contents.h"
10 #include "content/public/browser/web_contents.h" 11 #include "content/public/browser/web_contents.h"
11 #include "content/public/browser/web_contents_observer.h" 12 #include "content/public/browser/web_contents_observer.h"
12 #include "ui/views/controls/button/text_button.h" 13 #include "ui/views/controls/button/text_button.h"
13 #include "ui/views/controls/table/group_table_model.h" 14 #include "ui/views/controls/table/group_table_model.h"
14 #include "ui/views/controls/table/group_table_view.h" 15 #include "ui/views/controls/table/group_table_view.h"
15 #include "ui/views/window/dialog_delegate.h" 16 #include "ui/views/window/dialog_delegate.h"
16 17
17 using content::RenderViewHost; 18 using content::RenderViewHost;
18 using content::WebContents; 19 using content::WebContents;
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 class WebContentsObserverImpl : public content::WebContentsObserver { 57 class WebContentsObserverImpl : public content::WebContentsObserver {
57 public: 58 public:
58 WebContentsObserverImpl(HungPagesTableModel* model, 59 WebContentsObserverImpl(HungPagesTableModel* model,
59 TabContents* tab); 60 TabContents* tab);
60 61
61 WebContents* web_contents() const { 62 WebContents* web_contents() const {
62 return content::WebContentsObserver::web_contents(); 63 return content::WebContentsObserver::web_contents();
63 } 64 }
64 65
65 FaviconTabHelper* favicon_tab_helper() { 66 FaviconTabHelper* favicon_tab_helper() {
66 return tab_->favicon_tab_helper(); 67 return FaviconTabHelper::FromWebContents(web_contents());
67 } 68 }
68 69
69 // WebContentsObserver overrides: 70 // WebContentsObserver overrides:
70 virtual void RenderViewGone(base::TerminationStatus status) OVERRIDE; 71 virtual void RenderViewGone(base::TerminationStatus status) OVERRIDE;
71 virtual void WebContentsDestroyed(WebContents* tab) OVERRIDE; 72 virtual void WebContentsDestroyed(WebContents* tab) OVERRIDE;
72 73
73 private: 74 private:
74 HungPagesTableModel* model_; 75 HungPagesTableModel* model_;
75 TabContents* tab_; 76 TabContents* tab_;
76 77
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 // Whether or not we've created controls for ourself. 168 // Whether or not we've created controls for ourself.
168 bool initialized_; 169 bool initialized_;
169 170
170 // An amusing icon image. 171 // An amusing icon image.
171 static gfx::ImageSkia* frozen_icon_; 172 static gfx::ImageSkia* frozen_icon_;
172 173
173 DISALLOW_COPY_AND_ASSIGN(HungRendererDialogView); 174 DISALLOW_COPY_AND_ASSIGN(HungRendererDialogView);
174 }; 175 };
175 176
176 #endif // CHROME_BROWSER_UI_VIEWS_HUNG_RENDERER_VIEW_H_ 177 #endif // CHROME_BROWSER_UI_VIEWS_HUNG_RENDERER_VIEW_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/extensions/shell_window_views.cc ('k') | chrome/browser/ui/views/hung_renderer_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698