diff options
author | mark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-16 16:11:44 +0000 |
---|---|---|
committer | mark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-16 16:11:44 +0000 |
commit | 3dcedb59feadf6e29cf2e09f3aa3d401e35af1a2 (patch) | |
tree | c8ae5daacf1fe2bef4c9f5ff939dee8ae22b0429 /chrome/common/platform_util_mac.mm | |
parent | e20597e41de65f42beb5c797cf4cd1e40530e7b9 (diff) | |
download | chromium_src-3dcedb59feadf6e29cf2e09f3aa3d401e35af1a2.zip chromium_src-3dcedb59feadf6e29cf2e09f3aa3d401e35af1a2.tar.gz chromium_src-3dcedb59feadf6e29cf2e09f3aa3d401e35af1a2.tar.bz2 |
Cast the TabWindowController object to the correct type before treating it as
a TabWindowController.
Review URL: http://codereview.chromium.org/204030
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26349 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/platform_util_mac.mm')
-rw-r--r-- | chrome/common/platform_util_mac.mm | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/chrome/common/platform_util_mac.mm b/chrome/common/platform_util_mac.mm index 9c4cbe2..6d648d8 100644 --- a/chrome/common/platform_util_mac.mm +++ b/chrome/common/platform_util_mac.mm @@ -42,10 +42,13 @@ gfx::NativeWindow GetTopLevel(gfx::NativeView view) { string16 GetWindowTitle(gfx::NativeWindow window) { NSString* title = nil; - if ([[window delegate] isKindOfClass:[TabWindowController class]]) - title = [[window delegate] selectedTabTitle]; - else + if ([[window delegate] isKindOfClass:[TabWindowController class]]) { + TabWindowController* delegate = + reinterpret_cast<TabWindowController*>([window delegate]); + title = [delegate selectedTabTitle]; + } else { title = [window title]; + } // If we don't yet have a title, use "Untitled". if (![title length]) return WideToUTF16(l10n_util::GetString( |