diff options
author | derat@chromium.org <derat@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-11 20:30:01 +0000 |
---|---|---|
committer | derat@chromium.org <derat@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-11 20:30:01 +0000 |
commit | 783a771f812bfb0161cb66bd2ae6ad8749fde817 (patch) | |
tree | 546940175e4f4830ea8631ac4e53a94fdb109920 /chrome/browser/chromeos | |
parent | 98eeba848bf05cc733b7634117cb5860d7886ea5 (diff) | |
download | chromium_src-783a771f812bfb0161cb66bd2ae6ad8749fde817.zip chromium_src-783a771f812bfb0161cb66bd2ae6ad8749fde817.tar.gz chromium_src-783a771f812bfb0161cb66bd2ae6ad8749fde817.tar.bz2 |
chromeos: Remove old, unused window manager metrics code.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/2737008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49588 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/chromeos')
-rw-r--r-- | chrome/browser/chromeos/wm_ipc.cc | 54 | ||||
-rw-r--r-- | chrome/browser/chromeos/wm_ipc.h | 5 |
2 files changed, 0 insertions, 59 deletions
diff --git a/chrome/browser/chromeos/wm_ipc.cc b/chrome/browser/chromeos/wm_ipc.cc index da7cd15..1bb9a52 100644 --- a/chrome/browser/chromeos/wm_ipc.cc +++ b/chrome/browser/chromeos/wm_ipc.cc @@ -34,7 +34,6 @@ static const AtomInfo kAtomInfos[] = { { WmIpc::ATOM_STRING, "STRING" }, { WmIpc::ATOM_UTF8_STRING, "UTF8_STRING" }, { WmIpc::ATOM_WM_S0, "WM_S0" }, - { WmIpc::ATOM_WM_SYSTEM_METRICS, "WM_SYSTEM_METRICS" }, }; bool SetIntProperty(XID xid, Atom xatom, const std::vector<int>& values) { @@ -145,59 +144,6 @@ bool WmIpc::DecodeMessage(const GdkEventClient& event, Message* msg) { return true; } -bool WmIpc::DecodeStringMessage(const GdkEventProperty& event, - std::string* msg) { - DCHECK(NULL != msg); - if (type_to_atom_[ATOM_WM_SYSTEM_METRICS] != - gdk_x11_atom_to_xatom(event.atom)) - return false; - - DLOG(WARNING) << "Got property change notification for system metrics."; - if (GDK_PROPERTY_DELETE == event.state) { - DLOG(WARNING) << "Ignoring delete EventPropertyNotification"; - return false; - } - - // We will be using DBus for this communication in the future, so I don't - // really worry right now that we could generate more than 1KB here. - // Also, I use "long" rather than int64 because that is what X expects. - long acceptable_bytes = 1024; - Atom actual_type; - int actual_format; - unsigned long num_items, bytes_left; - unsigned char *output; - if (Success != XGetWindowProperty(x11_util::GetXDisplay(), - GDK_WINDOW_XID(event.window), - type_to_atom_[ATOM_WM_SYSTEM_METRICS], - 0, - acceptable_bytes, - false, - AnyPropertyType, - &actual_type, - &actual_format, - &num_items, - &bytes_left, - &output)) { - DLOG(WARNING) << "Could not read system metrics property from X."; - return false; - } - if (actual_format == 0) { - DLOG(WARNING) << "System Metrics property not set."; - return false; - } - if (actual_format != 8) { - DLOG(WARNING) << "Message was not encoded as a string of bytes..."; - return false; - } - if (bytes_left != 0) { - DLOG(ERROR) << "We wanted all the bytes at once..."; - return false; - } - msg->assign(reinterpret_cast<char*>(output), num_items); - XFree(output); - return true; -} - void WmIpc::HandleNonChromeClientMessageEvent(const GdkEventClient& event) { // Only do these lookups once; they should never change. static GdkAtom manager_gdk_atom = diff --git a/chrome/browser/chromeos/wm_ipc.h b/chrome/browser/chromeos/wm_ipc.h index f7381ee..2105803 100644 --- a/chrome/browser/chromeos/wm_ipc.h +++ b/chrome/browser/chromeos/wm_ipc.h @@ -29,7 +29,6 @@ class WmIpc { ATOM_STRING, ATOM_UTF8_STRING, ATOM_WM_S0, - ATOM_WM_SYSTEM_METRICS, kNumAtoms, }; @@ -102,10 +101,6 @@ class WmIpc { // returned. If false is returned, |event| is not a valid Message. bool DecodeMessage(const GdkEventClient& event, Message* msg); - // If |event| is a valid StringMessage it is decoded into |msg| and true is - // returned. If false is returned, |event| is not a valid StringMessage. - bool DecodeStringMessage(const GdkEventProperty& event, std::string* msg); - // Handles ClientMessage events that weren't decodable using DecodeMessage(). // Specifically, this catches messages about the WM_S0 selection that get sent // when a window manager process starts (so that we can re-run InitWmInfo()). |