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

Side by Side Diff: chrome/browser/platform_util.h

Issue 2688413007: Add display::GetDisplayNearestView (Closed)
Patch Set: add missing files Created 3 years, 10 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
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 #ifndef CHROME_BROWSER_PLATFORM_UTIL_H_ 5 #ifndef CHROME_BROWSER_PLATFORM_UTIL_H_
6 #define CHROME_BROWSER_PLATFORM_UTIL_H_ 6 #define CHROME_BROWSER_PLATFORM_UTIL_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback_forward.h" 10 #include "base/callback_forward.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 // |profile| is used to determine the running profile of file manager app in 70 // |profile| is used to determine the running profile of file manager app in
71 // Chrome OS only. |profile| is not used in platforms other than Chrome OS. Must 71 // Chrome OS only. |profile| is not used in platforms other than Chrome OS. Must
72 // be called on the UI thread. 72 // be called on the UI thread.
73 void ShowItemInFolder(Profile* profile, const base::FilePath& full_path); 73 void ShowItemInFolder(Profile* profile, const base::FilePath& full_path);
74 74
75 // Open the given external protocol URL in the desktop's default manner. 75 // Open the given external protocol URL in the desktop's default manner.
76 // (For example, mailto: URLs in the default mail user agent.) 76 // (For example, mailto: URLs in the default mail user agent.)
77 // Must be called from the UI thread. 77 // Must be called from the UI thread.
78 void OpenExternal(Profile* profile, const GURL& url); 78 void OpenExternal(Profile* profile, const GURL& url);
79 79
80 // Get the top level window for the native view. This can return NULL.
81 gfx::NativeWindow GetTopLevel(gfx::NativeView view);
82
83 // Returns a NativeView handle for parenting dialogs off |window|. This can be 80 // Returns a NativeView handle for parenting dialogs off |window|. This can be
84 // used to position a dialog using a NativeWindow, when a NativeView (e.g. 81 // used to position a dialog using a NativeWindow, when a NativeView (e.g.
85 // browser tab) isn't available. 82 // browser tab) isn't available.
86 gfx::NativeView GetViewForWindow(gfx::NativeWindow window); 83 gfx::NativeView GetViewForWindow(gfx::NativeWindow window);
87 84
88 // Get the direct parent of |view|, may return NULL. 85 // Get the direct parent of |view|, may return NULL.
89 gfx::NativeView GetParent(gfx::NativeView view); 86 gfx::NativeView GetParent(gfx::NativeView view);
90 87
91 // Returns true if |window| is the foreground top level window. 88 // Returns true if |window| is the foreground top level window.
92 bool IsWindowActive(gfx::NativeWindow window); 89 bool IsWindowActive(gfx::NativeWindow window);
93 90
94 // Activate the window, bringing it to the foreground top level. 91 // Activate the window, bringing it to the foreground top level.
95 void ActivateWindow(gfx::NativeWindow window); 92 void ActivateWindow(gfx::NativeWindow window);
96 93
97 // Returns true if the view is visible. The exact definition of this is 94 // Returns true if the view is visible. The exact definition of this is
98 // platform-specific, but it is generally not "visible to the user", rather 95 // platform-specific, but it is generally not "visible to the user", rather
99 // whether the view has the visible attribute set. 96 // whether the view has the visible attribute set.
100 bool IsVisible(gfx::NativeView view); 97 bool IsVisible(gfx::NativeView view);
101 98
102 #if defined(OS_MACOSX) 99 #if defined(OS_MACOSX)
103 // On 10.7+, back and forward swipe gestures can be triggered using a scroll 100 // On 10.7+, back and forward swipe gestures can be triggered using a scroll
104 // gesture, if enabled in System Preferences. This function returns true if 101 // gesture, if enabled in System Preferences. This function returns true if
105 // the feature is supported and enabled, and false otherwise. 102 // the feature is supported and enabled, and false otherwise.
106 bool IsSwipeTrackingFromScrollEventsEnabled(); 103 bool IsSwipeTrackingFromScrollEventsEnabled();
107 #endif 104 #endif
108 105
109 } // namespace platform_util 106 } // namespace platform_util
110 107
111 #endif // CHROME_BROWSER_PLATFORM_UTIL_H_ 108 #endif // CHROME_BROWSER_PLATFORM_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698