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/macros.h" | 8 #include "base/macros.h" |
9 #include "base/memory/scoped_vector.h" | |
10 #include "components/favicon/content/content_favicon_driver.h" | 9 #include "components/favicon/content/content_favicon_driver.h" |
11 #include "content/public/browser/web_contents_delegate.h" | 10 #include "content/public/browser/web_contents_delegate.h" |
12 #include "content/public/browser/web_contents_observer.h" | 11 #include "content/public/browser/web_contents_observer.h" |
13 #include "content/public/browser/web_contents_unresponsive_state.h" | 12 #include "content/public/browser/web_contents_unresponsive_state.h" |
14 #include "ui/base/models/table_model.h" | 13 #include "ui/base/models/table_model.h" |
15 #include "ui/views/controls/button/button.h" | 14 #include "ui/views/controls/button/button.h" |
16 #include "ui/views/controls/table/table_grouper.h" | 15 #include "ui/views/controls/table/table_grouper.h" |
17 #include "ui/views/controls/table/table_view.h" | 16 #include "ui/views/controls/table/table_view.h" |
18 #include "ui/views/window/dialog_delegate.h" | 17 #include "ui/views/window/dialog_delegate.h" |
19 | 18 |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 private: | 78 private: |
80 HungPagesTableModel* model_; | 79 HungPagesTableModel* model_; |
81 | 80 |
82 DISALLOW_COPY_AND_ASSIGN(WebContentsObserverImpl); | 81 DISALLOW_COPY_AND_ASSIGN(WebContentsObserverImpl); |
83 }; | 82 }; |
84 | 83 |
85 // Invoked when a WebContents is destroyed. Cleans up |tab_observers_| and | 84 // Invoked when a WebContents is destroyed. Cleans up |tab_observers_| and |
86 // notifies the observer and delegate. | 85 // notifies the observer and delegate. |
87 void TabDestroyed(WebContentsObserverImpl* tab); | 86 void TabDestroyed(WebContentsObserverImpl* tab); |
88 | 87 |
89 typedef ScopedVector<WebContentsObserverImpl> TabObservers; | 88 std::vector<std::unique_ptr<WebContentsObserverImpl>> tab_observers_; |
90 TabObservers tab_observers_; | |
91 | 89 |
92 ui::TableModelObserver* observer_; | 90 ui::TableModelObserver* observer_; |
93 Delegate* delegate_; | 91 Delegate* delegate_; |
94 | 92 |
95 DISALLOW_COPY_AND_ASSIGN(HungPagesTableModel); | 93 DISALLOW_COPY_AND_ASSIGN(HungPagesTableModel); |
96 }; | 94 }; |
97 | 95 |
98 // This class displays a dialog which contains information about a hung | 96 // This class displays a dialog which contains information about a hung |
99 // renderer process. | 97 // renderer process. |
100 class HungRendererDialogView : public views::DialogDelegateView, | 98 class HungRendererDialogView : public views::DialogDelegateView, |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 bool kill_button_clicked_; | 173 bool kill_button_clicked_; |
176 | 174 |
177 // A copy of the unresponsive state which ShowForWebContents was | 175 // A copy of the unresponsive state which ShowForWebContents was |
178 // called with. | 176 // called with. |
179 content::WebContentsUnresponsiveState unresponsive_state_; | 177 content::WebContentsUnresponsiveState unresponsive_state_; |
180 | 178 |
181 DISALLOW_COPY_AND_ASSIGN(HungRendererDialogView); | 179 DISALLOW_COPY_AND_ASSIGN(HungRendererDialogView); |
182 }; | 180 }; |
183 | 181 |
184 #endif // CHROME_BROWSER_UI_VIEWS_HUNG_RENDERER_VIEW_H_ | 182 #endif // CHROME_BROWSER_UI_VIEWS_HUNG_RENDERER_VIEW_H_ |
OLD | NEW |