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

Unified Diff: tools/memory_watcher/hotkey.h

Issue 314253003: Remove memory_watcher tool as well as --memory-profile command line flag. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compile issue on non-ChromeOS platforms Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/memory_watcher/dllmain.cc ('k') | tools/memory_watcher/ia32_modrm_map.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/memory_watcher/hotkey.h
diff --git a/tools/memory_watcher/hotkey.h b/tools/memory_watcher/hotkey.h
deleted file mode 100644
index 3ac430cdada2b7d3e3cae68d001b00d11479f59c..0000000000000000000000000000000000000000
--- a/tools/memory_watcher/hotkey.h
+++ /dev/null
@@ -1,50 +0,0 @@
-// Copyright (c) 2009 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.
-
-#ifndef TOOLS_MEMORY_WATCHER_HOTKEY_H_
-#define TOOLS_MEMORY_WATCHER_HOTKEY_H_
-
-#include "ui/gfx/rect.h"
-#include "ui/gfx/win/msg_util.h"
-#include "ui/gfx/win/window_impl.h"
-
-// HotKey handler.
-// Programs wishing to register a hotkey can use this.
-class HotKeyHandler : public gfx::WindowImpl {
- public:
- HotKeyHandler(UINT modifiers, UINT vk)
- : modifiers_(modifiers),
- vkey_(vk) {
- Start();
- }
- ~HotKeyHandler() { Stop(); }
-
- CR_BEGIN_MSG_MAP_EX(HotKeyHandler)
- CR_MSG_WM_HOTKEY(OnHotKey)
- CR_END_MSG_MAP()
-
- private:
- static const int hotkey_id = 0x0000baba;
-
- bool Start() {
- set_window_style(WS_POPUP);
- Init(NULL, gfx::Rect());
- return RegisterHotKey(hwnd(), hotkey_id, modifiers_, vkey_) == TRUE;
- }
-
- void Stop() {
- UnregisterHotKey(hwnd(), hotkey_id);
- DestroyWindow(hwnd());
- }
-
- // Handle the registered Hotkey being pressed.
- virtual void OnHotKey(UINT /*uMsg*/,
- WPARAM /*wParam*/,
- LPARAM /*lParam*/) = 0;
-
- UINT modifiers_;
- UINT vkey_;
-};
-
-#endif // TOOLS_MEMORY_WATCHER_HOTKEY_H_
« no previous file with comments | « tools/memory_watcher/dllmain.cc ('k') | tools/memory_watcher/ia32_modrm_map.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698