summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views/event_utils.h
blob: 0fdef8dd7d290b53f2f48252e14fd08555e7f553 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// Copyright (c) 2006-2008 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 CHROME_BROWSER_VIEWS_EVENT_UTILS_H__
#define CHROME_BROWSER_VIEWS_EVENT_UTILS_H__

#include "webkit/glue/window_open_disposition.h"

namespace views {
class MouseEvent;
}

namespace event_utils {

// Translates event flags into what kind of disposition they represents.
// For example, a middle click would mean to open a background tab.
// event_flags are the flags as understood by views::MouseEvent.
WindowOpenDisposition DispositionFromEventFlags(int event_flags);

// Returns true if the specified mouse event may have a
// WindowOptionDisposition.
bool IsPossibleDispositionEvent(const views::MouseEvent& event);

}

#endif  // CHROME_BROWSER_VIEWS_EVENT_UTILS_H__