| 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/favicon/favicon_tab_helper.h" |
| 10 #include "content/public/browser/web_contents_observer.h" | 10 #include "content/public/browser/web_contents_observer.h" |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 views::GroupRange* range) OVERRIDE; | 58 views::GroupRange* range) OVERRIDE; |
| 59 | 59 |
| 60 private: | 60 private: |
| 61 // Used to track a single WebContents. If the WebContents is destroyed | 61 // Used to track a single WebContents. If the WebContents is destroyed |
| 62 // TabDestroyed() is invoked on the model. | 62 // TabDestroyed() is invoked on the model. |
| 63 class WebContentsObserverImpl : public content::WebContentsObserver { | 63 class WebContentsObserverImpl : public content::WebContentsObserver { |
| 64 public: | 64 public: |
| 65 WebContentsObserverImpl(HungPagesTableModel* model, | 65 WebContentsObserverImpl(HungPagesTableModel* model, |
| 66 content::WebContents* tab); | 66 content::WebContents* tab); |
| 67 | 67 |
| 68 content::WebContents* web_contents() const { | |
| 69 return content::WebContentsObserver::web_contents(); | |
| 70 } | |
| 71 | |
| 72 FaviconTabHelper* favicon_tab_helper() { | 68 FaviconTabHelper* favicon_tab_helper() { |
| 73 return FaviconTabHelper::FromWebContents(web_contents()); | 69 return FaviconTabHelper::FromWebContents(web_contents()); |
| 74 } | 70 } |
| 75 | 71 |
| 76 // WebContentsObserver overrides: | 72 // WebContentsObserver overrides: |
| 77 virtual void RenderProcessGone(base::TerminationStatus status) OVERRIDE; | 73 virtual void RenderProcessGone(base::TerminationStatus status) OVERRIDE; |
| 78 virtual void WebContentsDestroyed() OVERRIDE; | 74 virtual void WebContentsDestroyed() OVERRIDE; |
| 79 | 75 |
| 80 private: | 76 private: |
| 81 HungPagesTableModel* model_; | 77 HungPagesTableModel* model_; |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 // Whether or not we've created controls for ourself. | 161 // Whether or not we've created controls for ourself. |
| 166 bool initialized_; | 162 bool initialized_; |
| 167 | 163 |
| 168 // An amusing icon image. | 164 // An amusing icon image. |
| 169 static gfx::ImageSkia* frozen_icon_; | 165 static gfx::ImageSkia* frozen_icon_; |
| 170 | 166 |
| 171 DISALLOW_COPY_AND_ASSIGN(HungRendererDialogView); | 167 DISALLOW_COPY_AND_ASSIGN(HungRendererDialogView); |
| 172 }; | 168 }; |
| 173 | 169 |
| 174 #endif // CHROME_BROWSER_UI_VIEWS_HUNG_RENDERER_VIEW_H_ | 170 #endif // CHROME_BROWSER_UI_VIEWS_HUNG_RENDERER_VIEW_H_ |
| OLD | NEW |