diff options
author | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-27 14:10:45 +0000 |
---|---|---|
committer | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-27 14:10:45 +0000 |
commit | a670807be316afb07951dbd2e05ef3d5680fe005 (patch) | |
tree | 49459187940625ac2bedcad98285adad622b0b2f /webkit/support | |
parent | f5b95ba9948b4ed8d723eecc1360b4a4c7201187 (diff) | |
download | chromium_src-a670807be316afb07951dbd2e05ef3d5680fe005.zip chromium_src-a670807be316afb07951dbd2e05ef3d5680fe005.tar.gz chromium_src-a670807be316afb07951dbd2e05ef3d5680fe005.tar.bz2 |
Content shell: Switch to scoped resetter.
BUG=90445
TEST=none
Review URL: https://chromiumcodereview.appspot.com/9809026
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@129182 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/support')
-rw-r--r-- | webkit/support/drt_application_mac.mm | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/webkit/support/drt_application_mac.mm b/webkit/support/drt_application_mac.mm index 9fc61da..9b6a5ea 100644 --- a/webkit/support/drt_application_mac.mm +++ b/webkit/support/drt_application_mac.mm @@ -1,19 +1,20 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 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 "webkit/support/drt_application_mac.h" +#include "base/auto_reset.h" + @implementation CrDrtApplication + - (BOOL)isHandlingSendEvent { return handlingSendEvent_; } - (void)sendEvent:(NSEvent*)event { - BOOL wasHandlingSendEvent = handlingSendEvent_; - handlingSendEvent_ = YES; + AutoReset<BOOL> scoper(&handlingSendEvent_, YES); [super sendEvent:event]; - handlingSendEvent_ = wasHandlingSendEvent; } - (void)setHandlingSendEvent:(BOOL)handlingSendEvent { |