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

Unified Diff: chrome/browser/external_tab_container_win.cc

Issue 5144005: Converts usage of SetProp/GetProp to a map. Even after making sure we (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/chrome
Patch Set: Fix build 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
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;
}
« 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