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

Side by Side Diff: chrome/browser/ui/webui/memory_internals/memory_internals_handler.cc

Issue 16632008: Use a direct include of strings headers in chrome/browser/ui/webui/, part 1. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/memory_internals/memory_internals_handler.h" 5 #include "chrome/browser/ui/webui/memory_internals/memory_internals_handler.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
11 #include "base/string16.h" 11 #include "base/strings/string16.h"
12 #include "base/values.h" 12 #include "base/values.h"
13 #include "chrome/browser/ui/webui/memory_internals/memory_internals_proxy.h" 13 #include "chrome/browser/ui/webui/memory_internals/memory_internals_proxy.h"
14 #include "content/public/browser/browser_thread.h" 14 #include "content/public/browser/browser_thread.h"
15 #include "content/public/browser/render_view_host.h" 15 #include "content/public/browser/render_view_host.h"
16 #include "content/public/browser/web_contents.h" 16 #include "content/public/browser/web_contents.h"
17 #include "content/public/browser/web_ui.h" 17 #include "content/public/browser/web_ui.h"
18 18
19 MemoryInternalsHandler::MemoryInternalsHandler() 19 MemoryInternalsHandler::MemoryInternalsHandler()
20 : proxy_(new MemoryInternalsProxy()) {} 20 : proxy_(new MemoryInternalsProxy()) {}
21 21
(...skipping 16 matching lines...) Expand all
38 proxy_->GetInfo(list); 38 proxy_->GetInfo(list);
39 } 39 }
40 40
41 void MemoryInternalsHandler::OnUpdate(const string16& update) { 41 void MemoryInternalsHandler::OnUpdate(const string16& update) {
42 // Don't try to execute JavaScript in a RenderView that no longer exists. 42 // Don't try to execute JavaScript in a RenderView that no longer exists.
43 content::RenderViewHost* host = 43 content::RenderViewHost* host =
44 web_ui()->GetWebContents()->GetRenderViewHost(); 44 web_ui()->GetWebContents()->GetRenderViewHost();
45 if (host) 45 if (host)
46 host->ExecuteJavascriptInWebFrame(string16(), update); 46 host->ExecuteJavascriptInWebFrame(string16(), update);
47 } 47 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/instant_ui.cc ('k') | chrome/browser/ui/webui/memory_internals/memory_internals_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698