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

Unified Diff: chrome/browser/ui/webui/memory_internals/memory_internals_handler.cc

Issue 1722493002: Project Eraser: Kill chrome://memory. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix chrome_browser_ui.gypi. Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/memory_internals/memory_internals_handler.cc
diff --git a/chrome/browser/ui/webui/memory_internals/memory_internals_handler.cc b/chrome/browser/ui/webui/memory_internals/memory_internals_handler.cc
deleted file mode 100644
index 8869a2ebc5ee5cdd217f8f995ee727d5f97286cb..0000000000000000000000000000000000000000
--- a/chrome/browser/ui/webui/memory_internals/memory_internals_handler.cc
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/browser/ui/webui/memory_internals/memory_internals_handler.h"
-
-#include <vector>
-
-#include "base/bind.h"
-#include "base/bind_helpers.h"
-#include "base/strings/string16.h"
-#include "base/values.h"
-#include "chrome/browser/ui/webui/memory_internals/memory_internals_proxy.h"
-#include "content/public/browser/browser_thread.h"
-#include "content/public/browser/render_frame_host.h"
-#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_ui.h"
-
-MemoryInternalsHandler::MemoryInternalsHandler()
- : proxy_(new MemoryInternalsProxy()) {}
-
-MemoryInternalsHandler::~MemoryInternalsHandler() {
- proxy_->Detach();
-}
-
-void MemoryInternalsHandler::RegisterMessages() {
- DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
- proxy_->Attach(this);
-
- // Set callback functions called by JavaScript messages.
- web_ui()->RegisterMessageCallback(
- "update",
- base::Bind(&MemoryInternalsHandler::OnJSUpdate,
- base::Unretained(this)));
-}
-
-void MemoryInternalsHandler::OnJSUpdate(const base::ListValue* list) {
- proxy_->StartFetch(list);
-}
-
-void MemoryInternalsHandler::OnUpdate(const base::string16& update) {
- // Don't try to execute JavaScript in a RenderFrame that no longer exists.
- content::RenderFrameHost* frame = web_ui()->GetWebContents()->GetMainFrame();
- if (frame)
- frame->ExecuteJavaScript(update);
-}

Powered by Google App Engine
This is Rietveld 408576698