Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 #ifndef CHROME_BROWSER_UI_VIEWS_EVENT_UTILS_H__ | 5 #ifndef CHROME_BROWSER_UI_EVENT_DISPOSITION_UTILS_H__ |
|
brettw
2011/05/31 06:09:06
I probably wouldn't have kept "utils" in the filen
shinyak (Google)
2011/06/09 02:29:04
Done.
| |
| 6 #define CHROME_BROWSER_UI_VIEWS_EVENT_UTILS_H__ | 6 #define CHROME_BROWSER_UI_EVENT_DISPOSITION_UTILS_H__ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "webkit/glue/window_open_disposition.h" | 9 #include "webkit/glue/window_open_disposition.h" |
| 10 | 10 |
| 11 namespace views { | |
| 12 class MouseEvent; | |
| 13 } | |
| 14 | |
| 15 namespace event_utils { | 11 namespace event_utils { |
|
brettw
2011/05/31 06:09:06
Seems like this should be "namespace ui"
Ben Goodger (Google)
2011/05/31 16:00:00
Probably namespace browser if nothing else. If it'
shinyak (Google)
2011/06/09 02:29:04
Done.
| |
| 16 | 12 |
| 17 // Translates event flags into what kind of disposition they represents. | 13 // Translates event flags into what kind of disposition they represents. |
| 18 // For example, a middle click would mean to open a background tab. | 14 // For example, a middle click would mean to open a background tab. |
| 19 // event_flags are the flags as understood by views::MouseEvent. | 15 // event_flags are the flags as understood by views::MouseEvent. |
| 20 WindowOpenDisposition DispositionFromEventFlags(int event_flags); | 16 WindowOpenDisposition DispositionFromEventFlags(int event_flags); |
| 21 | 17 |
| 22 // Returns true if the specified mouse event may have a | |
| 23 // WindowOptionDisposition. | |
| 24 bool IsPossibleDispositionEvent(const views::MouseEvent& event); | |
| 25 | |
| 26 } | 18 } |
| 27 | 19 |
| 28 #endif // CHROME_BROWSER_UI_VIEWS_EVENT_UTILS_H__ | 20 #endif // CHROME_BROWSER_UI_EVENT_DISPOSITION_UTILS_H__ |
| OLD | NEW |