OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #include "chrome/browser/ui/webui/hung_renderer_dialog.h" | 5 #include "chrome/browser/ui/webui/hung_renderer_dialog.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
11 #include "base/bind_helpers.h" | 11 #include "base/bind_helpers.h" |
12 #include "base/json/json_reader.h" | 12 #include "base/json/json_reader.h" |
13 #include "base/utf_string_conversions.h" | 13 #include "base/utf_string_conversions.h" |
14 #include "base/values.h" | 14 #include "base/values.h" |
15 #include "chrome/browser/ui/browser.h" | 15 #include "chrome/browser/ui/browser.h" |
16 #include "chrome/browser/ui/browser_list.h" | 16 #include "chrome/browser/ui/browser_list.h" |
17 #include "chrome/browser/ui/browser_dialogs.h" | 17 #include "chrome/browser/ui/browser_dialogs.h" |
18 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" | 18 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" |
19 #include "chrome/browser/ui/webui/html_dialog_ui.h" | 19 #include "chrome/browser/ui/webui/html_dialog_ui.h" |
20 #include "chrome/common/logging_chrome.h" | 20 #include "chrome/common/logging_chrome.h" |
21 #include "chrome/common/url_constants.h" | 21 #include "chrome/common/url_constants.h" |
22 #include "content/browser/renderer_host/render_view_host.h" | 22 #include "content/browser/renderer_host/render_view_host.h" |
23 #include "content/browser/tab_contents/tab_contents.h" | 23 #include "content/browser/tab_contents/tab_contents.h" |
24 #include "content/common/result_codes.h" | 24 #include "content/public/common/result_codes.h" |
25 #include "grit/generated_resources.h" | 25 #include "grit/generated_resources.h" |
26 #include "ui/base/l10n/l10n_util.h" | 26 #include "ui/base/l10n/l10n_util.h" |
27 | 27 |
28 namespace { | 28 namespace { |
29 HungRendererDialog* g_instance = NULL; | 29 HungRendererDialog* g_instance = NULL; |
30 const int kHungRendererDialogWidth = 425; | 30 const int kHungRendererDialogWidth = 425; |
31 const int kHungRendererDialogHeight = 200; | 31 const int kHungRendererDialogHeight = 200; |
32 } | 32 } |
33 | 33 |
34 namespace browser { | 34 namespace browser { |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 DictionaryValue* dict = new DictionaryValue(); | 204 DictionaryValue* dict = new DictionaryValue(); |
205 dict->SetString("url", it->tab_contents()->GetURL().spec()); | 205 dict->SetString("url", it->tab_contents()->GetURL().spec()); |
206 dict->SetString("title", title); | 206 dict->SetString("title", title); |
207 tab_contents_list.Append(dict); | 207 tab_contents_list.Append(dict); |
208 } | 208 } |
209 } | 209 } |
210 // Send list of tab contents details to javascript. | 210 // Send list of tab contents details to javascript. |
211 web_ui_->CallJavascriptFunction("hungRendererDialog.setTabContentsList", | 211 web_ui_->CallJavascriptFunction("hungRendererDialog.setTabContentsList", |
212 tab_contents_list); | 212 tab_contents_list); |
213 } | 213 } |
OLD | NEW |