Index: chrome/browser/external_tab_container_win.cc |
diff --git a/chrome/browser/external_tab_container_win.cc b/chrome/browser/external_tab_container_win.cc |
index 41b0a990f6217c5d98e074176ab2157a1d72168a..a248db2e6ff8498448e4d3f082e086120942d03c 100644 |
--- a/chrome/browser/external_tab_container_win.cc |
+++ b/chrome/browser/external_tab_container_win.cc |
@@ -7,7 +7,7 @@ |
#include <string> |
#include "app/l10n_util.h" |
-#include "app/win/scoped_prop.h" |
+#include "app/view_prop.h" |
#include "base/debug/trace_event.h" |
#include "base/i18n/rtl.h" |
#include "base/logging.h" |
@@ -47,7 +47,9 @@ |
#include "views/widget/root_view.h" |
#include "views/window/window.h" |
-static const wchar_t kWindowObjectKey[] = L"ChromeWindowObject"; |
+using app::ViewProp; |
+ |
+static const char kWindowObjectKey[] = "ChromeWindowObject"; |
// This class overrides the LinkActivated function in the PageInfoBubbleView |
// class and routes the help center link navigation to the host browser. |
@@ -134,8 +136,7 @@ bool ExternalTabContainer::Init(Profile* profile, |
// TODO(jcampan): limit focus traversal to contents. |
- prop_.reset( |
- new app::win::ScopedProp(GetNativeView(), kWindowObjectKey, this)); |
+ prop_.reset(new ViewProp(GetNativeView(), kWindowObjectKey, this)); |
if (existing_contents) { |
tab_contents_ = existing_contents; |
@@ -284,10 +285,7 @@ void ExternalTabContainer::FocusThroughTabTraversal( |
// static |
bool ExternalTabContainer::IsExternalTabContainer(HWND window) { |
- if (::GetProp(window, kWindowObjectKey) != NULL) |
- return true; |
- |
- return false; |
+ return ViewProp::GetValue(window, kWindowObjectKey) != NULL; |
} |
// static |
@@ -301,7 +299,7 @@ ExternalTabContainer* ExternalTabContainer::GetContainerForTab( |
return NULL; |
} |
ExternalTabContainer* container = reinterpret_cast<ExternalTabContainer*>( |
- GetProp(parent_window, kWindowObjectKey)); |
+ ViewProp::GetValue(parent_window, kWindowObjectKey)); |
return container; |
} |
@@ -311,8 +309,8 @@ ExternalTabContainer* |
gfx::NativeView native_window) { |
ExternalTabContainer* tab_container = NULL; |
if (native_window) { |
- HANDLE handle = ::GetProp(native_window, kWindowObjectKey); |
- tab_container = reinterpret_cast<ExternalTabContainer*>(handle); |
+ tab_container = reinterpret_cast<ExternalTabContainer*>( |
+ ViewProp::GetValue(native_window, kWindowObjectKey)); |
} |
return tab_container; |
} |