diff options
author | amit@chromium.org <amit@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-12 18:19:07 +0000 |
---|---|---|
committer | amit@chromium.org <amit@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-12 18:19:07 +0000 |
commit | 4e676aa41d39aada2731e64f2807611cfad2c785 (patch) | |
tree | 409c055c2d5c1849e707e93b97f55e5afcdaf6b1 /chrome_frame/utils.cc | |
parent | aedd87e5b5e0ee568309eba54b31cb8aa12cd6e6 (diff) | |
download | chromium_src-4e676aa41d39aada2731e64f2807611cfad2c785.zip chromium_src-4e676aa41d39aada2731e64f2807611cfad2c785.tar.gz chromium_src-4e676aa41d39aada2731e64f2807611cfad2c785.tar.bz2 |
First batch of context menu tests
Refactored various methods to send keyboard and mouse
input. Fixed the context menu focus issue on IE7.
Improved existing tests to make them less flaky and
added 3 new tests for context menu items.
BUG=34673
TEST=new tests added
Review URL: http://codereview.chromium.org/604014
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38905 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/utils.cc')
-rw-r--r-- | chrome_frame/utils.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/chrome_frame/utils.cc b/chrome_frame/utils.cc index 620865d..bd803bf 100644 --- a/chrome_frame/utils.cc +++ b/chrome_frame/utils.cc @@ -857,3 +857,12 @@ std::wstring GetActualUrlFromMoniker(IMoniker* moniker, return moniker_url; } +bool IsTopLevelWindow(HWND window) { + long style = GetWindowLong(window, GWL_STYLE); // NOLINT + if (!(style & WS_CHILD)) + return true; + + HWND parent = GetParent(window); + return !parent || (parent == GetDesktopWindow()); +} + |