| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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_ |
| OLD | NEW |