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

Unified Diff: chrome/browser/ui/webui/tracing_ui.cc

Issue 9003014: Replace WebUI::tab_contents() with web_contents() and switch all users to use web_contents.h inst... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/webui/tracing_ui.h ('k') | chrome/browser/ui/webui/uber/uber_ui.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/tracing_ui.cc
===================================================================
--- chrome/browser/ui/webui/tracing_ui.cc (revision 116011)
+++ chrome/browser/ui/webui/tracing_ui.cc (working copy)
@@ -20,15 +20,16 @@
#include "chrome/common/url_constants.h"
#include "content/browser/gpu/gpu_data_manager.h"
#include "content/browser/renderer_host/render_view_host.h"
-#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/tab_contents/tab_contents_view.h"
#include "content/browser/trace_controller.h"
#include "content/public/browser/browser_thread.h"
+#include "content/public/browser/web_contents.h"
#include "grit/browser_resources.h"
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
using content::BrowserThread;
+using content::WebContents;
namespace {
@@ -305,8 +306,8 @@
SelectFileDialog::SELECT_OPEN_FILE,
string16(),
FilePath(),
- NULL, 0, FILE_PATH_LITERAL(""), web_ui()->tab_contents(),
- web_ui()->tab_contents()->GetView()->GetTopLevelNativeWindow(), NULL);
+ NULL, 0, FILE_PATH_LITERAL(""), web_ui()->web_contents(),
+ web_ui()->web_contents()->GetView()->GetTopLevelNativeWindow(), NULL);
}
void TracingMessageHandler::LoadTraceFileComplete(std::string* file_contents) {
@@ -314,7 +315,7 @@
std::string javascript = "tracingController.onLoadTraceFileComplete("
+ *file_contents + ");";
- web_ui()->tab_contents()->GetRenderViewHost()->
+ web_ui()->web_contents()->GetRenderViewHost()->
ExecuteJavascriptInWebFrame(string16(), UTF8ToUTF16(javascript));
}
@@ -336,8 +337,8 @@
SelectFileDialog::SELECT_SAVEAS_FILE,
string16(),
FilePath(),
- NULL, 0, FILE_PATH_LITERAL(""), web_ui()->tab_contents(),
- web_ui()->tab_contents()->GetView()->GetTopLevelNativeWindow(), NULL);
+ NULL, 0, FILE_PATH_LITERAL(""), web_ui()->web_contents(),
+ web_ui()->web_contents()->GetView()->GetTopLevelNativeWindow(), NULL);
}
void TracingMessageHandler::SaveTraceFileComplete() {
@@ -388,7 +389,7 @@
trace_buffer.Finish();
output.Append(");");
- web_ui()->tab_contents()->GetRenderViewHost()->
+ web_ui()->web_contents()->GetRenderViewHost()->
ExecuteJavascriptInWebFrame(string16(), UTF8ToUTF16(output.json_output));
}
@@ -408,7 +409,7 @@
//
////////////////////////////////////////////////////////////////////////////////
-TracingUI::TracingUI(TabContents* contents) : ChromeWebUI(contents) {
+TracingUI::TracingUI(WebContents* contents) : ChromeWebUI(contents) {
AddMessageHandler(new TracingMessageHandler());
// Set up the chrome://tracing/ source.
« no previous file with comments | « chrome/browser/ui/webui/tracing_ui.h ('k') | chrome/browser/ui/webui/uber/uber_ui.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698