Chromium Code Reviews| 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 51 OVERRIDE; | 52 OVERRIDE; |
| 52 | 53 |
| 53 private: | 54 private: |
| 54 // Used to track a single WebContents. If the WebContents is destroyed | 55 // Used to track a single WebContents. If the WebContents is destroyed |
| 55 // TabDestroyed() is invoked on the model. | 56 // TabDestroyed() is invoked on the model. |
| 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 using content::WebContentsObserver::web_contents; |
|
stevenjb
2012/10/01 17:56:51
My understanding is that we avoid 'using' in heade
Avi (use Gerrit)
2012/10/01 19:23:57
Done.
| |
| 62 return content::WebContentsObserver::web_contents(); | |
| 63 } | |
| 64 | 63 |
| 65 FaviconTabHelper* favicon_tab_helper() { | 64 FaviconTabHelper* favicon_tab_helper() { |
| 66 return tab_->favicon_tab_helper(); | 65 return FaviconTabHelper::FromWebContents(web_contents()); |
| 67 } | 66 } |
| 68 | 67 |
| 69 // WebContentsObserver overrides: | 68 // WebContentsObserver overrides: |
| 70 virtual void RenderViewGone(base::TerminationStatus status) OVERRIDE; | 69 virtual void RenderViewGone(base::TerminationStatus status) OVERRIDE; |
| 71 virtual void WebContentsDestroyed(WebContents* tab) OVERRIDE; | 70 virtual void WebContentsDestroyed(WebContents* tab) OVERRIDE; |
| 72 | 71 |
| 73 private: | 72 private: |
| 74 HungPagesTableModel* model_; | 73 HungPagesTableModel* model_; |
| 75 TabContents* tab_; | 74 TabContents* tab_; |
| 76 | 75 |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 167 // Whether or not we've created controls for ourself. | 166 // Whether or not we've created controls for ourself. |
| 168 bool initialized_; | 167 bool initialized_; |
| 169 | 168 |
| 170 // An amusing icon image. | 169 // An amusing icon image. |
| 171 static gfx::ImageSkia* frozen_icon_; | 170 static gfx::ImageSkia* frozen_icon_; |
| 172 | 171 |
| 173 DISALLOW_COPY_AND_ASSIGN(HungRendererDialogView); | 172 DISALLOW_COPY_AND_ASSIGN(HungRendererDialogView); |
| 174 }; | 173 }; |
| 175 | 174 |
| 176 #endif // CHROME_BROWSER_UI_VIEWS_HUNG_RENDERER_VIEW_H_ | 175 #endif // CHROME_BROWSER_UI_VIEWS_HUNG_RENDERER_VIEW_H_ |
| OLD | NEW |