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

Unified Diff: chrome/browser/external_tab_container_win.cc

Issue 5184009: Revert 66784 - Converts usage of SetProp/GetProp to a map. Even after making ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/external_tab_container_win.cc
===================================================================
--- chrome/browser/external_tab_container_win.cc (revision 66785)
+++ chrome/browser/external_tab_container_win.cc (working copy)
@@ -7,7 +7,7 @@
#include <string>
#include "app/l10n_util.h"
-#include "app/view_prop.h"
+#include "app/win/scoped_prop.h"
#include "base/debug/trace_event.h"
#include "base/i18n/rtl.h"
#include "base/logging.h"
@@ -47,10 +47,8 @@
#include "views/widget/root_view.h"
#include "views/window/window.h"
-using app::ViewProp;
+static const wchar_t kWindowObjectKey[] = L"ChromeWindowObject";
-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.
class ExternalTabPageInfoBubbleView : public PageInfoBubbleView {
@@ -136,7 +134,8 @@
// TODO(jcampan): limit focus traversal to contents.
- prop_.reset(new ViewProp(GetNativeView(), kWindowObjectKey, this));
+ prop_.reset(
+ new app::win::ScopedProp(GetNativeView(), kWindowObjectKey, this));
if (existing_contents) {
tab_contents_ = existing_contents;
@@ -285,7 +284,10 @@
// static
bool ExternalTabContainer::IsExternalTabContainer(HWND window) {
- return ViewProp::GetValue(window, kWindowObjectKey) != NULL;
+ if (::GetProp(window, kWindowObjectKey) != NULL)
+ return true;
+
+ return false;
}
// static
@@ -299,7 +301,7 @@
return NULL;
}
ExternalTabContainer* container = reinterpret_cast<ExternalTabContainer*>(
- ViewProp::GetValue(parent_window, kWindowObjectKey));
+ GetProp(parent_window, kWindowObjectKey));
return container;
}
@@ -309,8 +311,8 @@
gfx::NativeView native_window) {
ExternalTabContainer* tab_container = NULL;
if (native_window) {
- tab_container = reinterpret_cast<ExternalTabContainer*>(
- ViewProp::GetValue(native_window, kWindowObjectKey));
+ HANDLE handle = ::GetProp(native_window, kWindowObjectKey);
+ tab_container = reinterpret_cast<ExternalTabContainer*>(handle);
}
return tab_container;
}
« no previous file with comments | « chrome/browser/external_tab_container_win.h ('k') | chrome/browser/renderer_host/render_widget_host_view_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698