diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-27 23:01:21 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-27 23:01:21 +0000 |
commit | 5cdc8bdb4c847cefe7f4542bd10c9880c2c557a0 (patch) | |
tree | 77968aa7e83893662e3e8276d186b8a9b8868d74 | |
parent | 5544f39feaa60648ea95c75eefb2a7239ce0f4aa (diff) | |
download | chromium_src-5cdc8bdb4c847cefe7f4542bd10c9880c2c557a0.zip chromium_src-5cdc8bdb4c847cefe7f4542bd10c9880c2c557a0.tar.gz chromium_src-5cdc8bdb4c847cefe7f4542bd10c9880c2c557a0.tar.bz2 |
With the recent change to the ExternalTabContainer to have it subclass WidgetWin rather than Widget and the associated ATL classes, the class name based comparison for a window
to check if it is an external tab container window is no longer valid.
We now check if a window is an external tab window by looking for the existence of the kWindowObjectKey window property, which is only set on external tab container windows.
Review URL: http://codereview.chromium.org/115833
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17034 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/external_tab_container.cc | 6 | ||||
-rw-r--r-- | chrome/common/chrome_constants.cc | 1 | ||||
-rw-r--r-- | chrome/common/chrome_constants.h | 1 |
3 files changed, 4 insertions, 4 deletions
diff --git a/chrome/browser/external_tab_container.cc b/chrome/browser/external_tab_container.cc index 24fb0c0..0af1adb 100644 --- a/chrome/browser/external_tab_container.cc +++ b/chrome/browser/external_tab_container.cc @@ -124,8 +124,10 @@ void ExternalTabContainer::SetInitialFocus(bool reverse) { // static bool ExternalTabContainer::IsExternalTabContainer(HWND window) { - std::wstring class_name = win_util::GetClassName(window); - return _wcsicmp(class_name.c_str(), chrome::kExternalTabWindowClass) == 0; + if (GetProp(window, kWindowObjectKey) != NULL) + return true; + + return false; } // static diff --git a/chrome/common/chrome_constants.cc b/chrome/common/chrome_constants.cc index 74e69b3..f15f04a 100644 --- a/chrome/common/chrome_constants.cc +++ b/chrome/common/chrome_constants.cc @@ -43,7 +43,6 @@ const char kStatsFilename[] = "ChromeStats2"; const wchar_t kBrowserAppName[] = L"Chromium"; const char kStatsFilename[] = "ChromiumStats2"; #endif -const wchar_t kExternalTabWindowClass[] = L"Chrome_ExternalTabContainer"; const wchar_t kMessageWindowClass[] = L"Chrome_MessageWindow"; const wchar_t kCrashReportLog[] = L"Reported Crashes.txt"; const wchar_t kTestingInterfaceDLL[] = L"testing_interface.dll"; diff --git a/chrome/common/chrome_constants.h b/chrome/common/chrome_constants.h index 567b744..8864d56 100644 --- a/chrome/common/chrome_constants.h +++ b/chrome/common/chrome_constants.h @@ -15,7 +15,6 @@ extern const wchar_t kBrowserProcessExecutableName[]; extern const wchar_t kBrowserProcessExecutablePath[]; extern const wchar_t kBrowserAppName[]; extern const wchar_t kMessageWindowClass[]; -extern const wchar_t kExternalTabWindowClass[]; extern const wchar_t kCrashReportLog[]; extern const wchar_t kTestingInterfaceDLL[]; extern const wchar_t kNotSignedInProfile[]; |