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

Side by Side Diff: chrome/browser/ui/cocoa/event_utils.mm

Issue 11896047: Move the methods in disposition_utils.h and event_disposition.h to ui\base\window_open_disposition.… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix regex in ui.gyp Created 7 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/browser.h ('k') | chrome/browser/ui/extensions/application_launch.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import "chrome/browser/ui/cocoa/event_utils.h" 5 #import "chrome/browser/ui/cocoa/event_utils.h"
6 6
7 #include "chrome/browser/event_disposition.h"
8 #include "ui/base/events/event_constants.h" 7 #include "ui/base/events/event_constants.h"
8 #include "ui/base/window_open_disposition.h"
9 9
10 namespace { 10 namespace {
11 11
12 bool isLeftButtonEvent(NSEvent* event) { 12 bool isLeftButtonEvent(NSEvent* event) {
13 NSEventType type = [event type]; 13 NSEventType type = [event type];
14 return type == NSLeftMouseDown || 14 return type == NSLeftMouseDown ||
15 type == NSLeftMouseDragged || 15 type == NSLeftMouseDragged ||
16 type == NSLeftMouseUp; 16 type == NSLeftMouseUp;
17 } 17 }
18 18
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 } 57 }
58 58
59 WindowOpenDisposition WindowOpenDispositionFromNSEvent(NSEvent* event) { 59 WindowOpenDisposition WindowOpenDispositionFromNSEvent(NSEvent* event) {
60 NSUInteger modifiers = [event modifierFlags]; 60 NSUInteger modifiers = [event modifierFlags];
61 return WindowOpenDispositionFromNSEventWithFlags(event, modifiers); 61 return WindowOpenDispositionFromNSEventWithFlags(event, modifiers);
62 } 62 }
63 63
64 WindowOpenDisposition WindowOpenDispositionFromNSEventWithFlags( 64 WindowOpenDisposition WindowOpenDispositionFromNSEventWithFlags(
65 NSEvent* event, NSUInteger modifiers) { 65 NSEvent* event, NSUInteger modifiers) {
66 int event_flags = EventFlagsFromNSEventWithModifiers(event, modifiers); 66 int event_flags = EventFlagsFromNSEventWithModifiers(event, modifiers);
67 return chrome::DispositionFromEventFlags(event_flags); 67 return ui::DispositionFromEventFlags(event_flags);
68 } 68 }
69 69
70 } // namespace event_utils 70 } // namespace event_utils
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser.h ('k') | chrome/browser/ui/extensions/application_launch.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698