Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(59)

Side by Side Diff: chrome/browser/ui/webui/hung_renderer_dialog.cc

Issue 8986007: Move WebUIMessageHandler to its own file in the public directory and put it in the content namesp... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/dialog_style.h" 18 #include "chrome/browser/ui/dialog_style.h"
19 #include "chrome/browser/ui/tab_contents/core_tab_helper.h" 19 #include "chrome/browser/ui/tab_contents/core_tab_helper.h"
20 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" 20 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
21 #include "chrome/browser/ui/webui/html_dialog_ui.h" 21 #include "chrome/browser/ui/webui/html_dialog_ui.h"
22 #include "chrome/common/logging_chrome.h" 22 #include "chrome/common/logging_chrome.h"
23 #include "chrome/common/url_constants.h" 23 #include "chrome/common/url_constants.h"
24 #include "content/browser/renderer_host/render_view_host.h" 24 #include "content/browser/renderer_host/render_view_host.h"
25 #include "content/browser/tab_contents/tab_contents.h" 25 #include "content/browser/tab_contents/tab_contents.h"
26 #include "content/browser/webui/web_ui.h"
26 #include "content/public/common/result_codes.h" 27 #include "content/public/common/result_codes.h"
27 #include "grit/generated_resources.h" 28 #include "grit/generated_resources.h"
28 #include "ui/base/l10n/l10n_util.h" 29 #include "ui/base/l10n/l10n_util.h"
29 30
30 using content::WebContents; 31 using content::WebContents;
32 using content::WebUIMessageHandler;
31 33
32 namespace { 34 namespace {
33 HungRendererDialog* g_instance = NULL; 35 HungRendererDialog* g_instance = NULL;
34 const int kHungRendererDialogWidth = 425; 36 const int kHungRendererDialogWidth = 425;
35 const int kHungRendererDialogHeight = 200; 37 const int kHungRendererDialogHeight = 200;
36 } 38 }
37 39
38 namespace browser { 40 namespace browser {
39 41
40 void ShowHungRendererDialog(WebContents* contents) { 42 void ShowHungRendererDialog(WebContents* contents) {
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 DictionaryValue* dict = new DictionaryValue(); 237 DictionaryValue* dict = new DictionaryValue();
236 dict->SetString("url", it->tab_contents()->GetURL().spec()); 238 dict->SetString("url", it->tab_contents()->GetURL().spec());
237 dict->SetString("title", title); 239 dict->SetString("title", title);
238 tab_contents_list.Append(dict); 240 tab_contents_list.Append(dict);
239 } 241 }
240 } 242 }
241 // Send list of tab contents details to javascript. 243 // Send list of tab contents details to javascript.
242 web_ui()->CallJavascriptFunction("hungRendererDialog.setTabContentsList", 244 web_ui()->CallJavascriptFunction("hungRendererDialog.setTabContentsList",
243 tab_contents_list); 245 tab_contents_list);
244 } 246 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/hung_renderer_dialog.h ('k') | chrome/browser/ui/webui/input_window_dialog_webui.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698