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

Side by Side Diff: ui/events/scoped_target_handler.cc

Issue 1411833006: Refactoring to make adding ink drop animations easier (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Refactor ink drop animations (simplify MenuButton) Created 5 years, 1 month 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
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "ui/events/scoped_target_handler.h"
6
7 #include "ui/events/event.h"
8 #include "ui/events/event_target.h"
9
10 namespace ui {
11
12 ScopedTargetHandler::ScopedTargetHandler(EventTarget* target,
13 EventHandler* handler)
14 : target_(target), handler_(handler) {
15 original_handler_ = target_->SetTargetHandler(handler);
16 }
17
18 ScopedTargetHandler::~ScopedTargetHandler() {
19 EventHandler* handler = target_->SetTargetHandler(original_handler_);
20 DCHECK_EQ(handler_, handler);
21 }
22
23 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698