summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views
diff options
context:
space:
mode:
authoravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-09 20:20:47 +0000
committeravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-09 20:20:47 +0000
commitd50cca412ec42dd9ccbc33cc38d1f7021a54b4fb (patch)
tree6cd4024bd99e5508b5e8226758924c1973210664 /chrome/browser/views
parentc3826037cbcb22fe784a10589061eaf084818727 (diff)
downloadchromium_src-d50cca412ec42dd9ccbc33cc38d1f7021a54b4fb.zip
chromium_src-d50cca412ec42dd9ccbc33cc38d1f7021a54b4fb.tar.gz
chromium_src-d50cca412ec42dd9ccbc33cc38d1f7021a54b4fb.tar.bz2
Switch from HWNDs to NativeViews.
Review URL: http://codereview.chromium.org/21143 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9409 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views')
-rw-r--r--chrome/browser/views/blocked_popup_container.cc2
-rw-r--r--chrome/browser/views/constrained_window_impl.cc2
-rw-r--r--chrome/browser/views/dom_view.cc2
-rw-r--r--chrome/browser/views/download_started_animation.cc2
-rw-r--r--chrome/browser/views/external_protocol_dialog.cc2
-rw-r--r--chrome/browser/views/hung_renderer_view.cc4
-rw-r--r--chrome/browser/views/tab_contents_container_view.cc10
-rw-r--r--chrome/browser/views/tabs/dragged_tab_controller.cc4
8 files changed, 14 insertions, 14 deletions
diff --git a/chrome/browser/views/blocked_popup_container.cc b/chrome/browser/views/blocked_popup_container.cc
index b7cb046..e961a8c 100644
--- a/chrome/browser/views/blocked_popup_container.cc
+++ b/chrome/browser/views/blocked_popup_container.cc
@@ -450,7 +450,7 @@ void BlockedPopupContainer::Init(const gfx::Point& initial_anchor) {
container_view_->SetVisible(true);
set_window_style(WS_CHILD | WS_CLIPSIBLINGS | WS_CLIPCHILDREN);
- WidgetWin::Init(owner_->GetContainerHWND(), gfx::Rect(), false);
+ WidgetWin::Init(owner_->GetNativeView(), gfx::Rect(), false);
SetContentsView(container_view_);
RepositionConstrainedWindowTo(initial_anchor);
diff --git a/chrome/browser/views/constrained_window_impl.cc b/chrome/browser/views/constrained_window_impl.cc
index de00ad2..3af7ed0 100644
--- a/chrome/browser/views/constrained_window_impl.cc
+++ b/chrome/browser/views/constrained_window_impl.cc
@@ -673,7 +673,7 @@ void ConstrainedWindowImpl::Init(TabContents* owner) {
}
void ConstrainedWindowImpl::InitAsDialog(const gfx::Rect& initial_bounds) {
- CustomFrameWindow::Init(owner_->GetContainerHWND(), initial_bounds);
+ CustomFrameWindow::Init(owner_->GetNativeView(), initial_bounds);
ActivateConstrainedWindow();
}
diff --git a/chrome/browser/views/dom_view.cc b/chrome/browser/views/dom_view.cc
index f6c92a8..226f7b8 100644
--- a/chrome/browser/views/dom_view.cc
+++ b/chrome/browser/views/dom_view.cc
@@ -32,7 +32,7 @@ bool DOMView::Init(Profile* profile, SiteInstance* instance) {
host_ = tab_contents->AsDOMUIHost();
DCHECK(host_);
- views::HWNDView::Attach(host_->GetContainerHWND());
+ views::HWNDView::Attach(host_->GetNativeView());
host_->SetupController(profile);
host_->controller()->LoadURL(contents_, GURL(), PageTransition::START_PAGE);
return true;
diff --git a/chrome/browser/views/download_started_animation.cc b/chrome/browser/views/download_started_animation.cc
index e09debc..3d91712 100644
--- a/chrome/browser/views/download_started_animation.cc
+++ b/chrome/browser/views/download_started_animation.cc
@@ -54,7 +54,7 @@ DownloadStartedAnimation::DownloadStartedAnimation(TabContents* tab_contents)
popup_->set_window_ex_style(WS_EX_LAYERED | WS_EX_TOOLWINDOW |
WS_EX_TRANSPARENT);
popup_->SetLayeredAlpha(0x00);
- popup_->Init(tab_contents_->GetContainerHWND(), rc, false);
+ popup_->Init(tab_contents_->GetNativeView(), rc, false);
popup_->SetContentsView(this);
Reposition();
popup_->ShowWindow(SW_SHOWNOACTIVATE);
diff --git a/chrome/browser/views/external_protocol_dialog.cc b/chrome/browser/views/external_protocol_dialog.cc
index 594dfbb..76c1267 100644
--- a/chrome/browser/views/external_protocol_dialog.cc
+++ b/chrome/browser/views/external_protocol_dialog.cc
@@ -110,7 +110,7 @@ ExternalProtocolDialog::ExternalProtocolDialog(TabContents* tab_contents,
kMessageWidth);
HWND root_hwnd;
if (tab_contents_) {
- root_hwnd = GetAncestor(tab_contents_->GetContentHWND(), GA_ROOT);
+ root_hwnd = GetAncestor(tab_contents_->GetContentNativeView(), GA_ROOT);
} else {
// Dialog is top level if we don't have a tab_contents associated with us.
root_hwnd = NULL;
diff --git a/chrome/browser/views/hung_renderer_view.cc b/chrome/browser/views/hung_renderer_view.cc
index 8c7ca7a..7e0b3df 100644
--- a/chrome/browser/views/hung_renderer_view.cc
+++ b/chrome/browser/views/hung_renderer_view.cc
@@ -223,7 +223,7 @@ void HungRendererWarningView::ShowForWebContents(WebContents* contents) {
// Don't show the warning unless the foreground window is the frame, or this
// window (but still invisible). If the user has another window or
// application selected, activating ourselves is rude.
- HWND frame_hwnd = GetAncestor(contents->GetContainerHWND(), GA_ROOT);
+ HWND frame_hwnd = GetAncestor(contents->GetNativeView(), GA_ROOT);
HWND foreground_window = GetForegroundWindow();
if (foreground_window != frame_hwnd &&
foreground_window != window()->GetHWND()) {
@@ -400,7 +400,7 @@ void HungRendererWarningView::CreateKillButtonView() {
gfx::Rect HungRendererWarningView::GetDisplayBounds(
WebContents* contents) {
- HWND contents_hwnd = contents->GetContainerHWND();
+ HWND contents_hwnd = contents->GetNativeView();
CRect contents_bounds;
GetWindowRect(contents_hwnd, &contents_bounds);
diff --git a/chrome/browser/views/tab_contents_container_view.cc b/chrome/browser/views/tab_contents_container_view.cc
index 3228dba..6c8e0c3 100644
--- a/chrome/browser/views/tab_contents_container_view.cc
+++ b/chrome/browser/views/tab_contents_container_view.cc
@@ -34,7 +34,7 @@ void TabContentsContainerView::SetTabContents(TabContents* tab_contents) {
if (tab_contents_) {
// TODO(brettw) should this move to HWNDView::Detach which is called below?
// It needs cleanup regardless.
- HWND container_hwnd = tab_contents_->GetContainerHWND();
+ HWND container_hwnd = tab_contents_->GetNativeView();
// Hide the contents before adjusting its parent to avoid a full desktop
// flicker.
@@ -47,7 +47,7 @@ void TabContentsContainerView::SetTabContents(TabContents* tab_contents) {
// Unregister the tab contents window from the FocusManager.
views::FocusManager::UninstallFocusSubclass(container_hwnd);
- HWND hwnd = tab_contents_->GetContentHWND();
+ HWND hwnd = tab_contents_->GetContentNativeView();
if (hwnd) {
// We may not have an HWND anymore, if the renderer crashed and we are
// displaying the sad tab for example.
@@ -80,8 +80,8 @@ void TabContentsContainerView::SetTabContents(TabContents* tab_contents) {
// TabContents window (for the WebContents case).
SetAssociatedFocusView(this);
- Attach(tab_contents->GetContainerHWND());
- HWND contents_hwnd = tab_contents_->GetContentHWND();
+ Attach(tab_contents->GetNativeView());
+ HWND contents_hwnd = tab_contents_->GetContentNativeView();
if (contents_hwnd)
FocusManager::InstallFocusSubclass(contents_hwnd, this);
@@ -151,7 +151,7 @@ views::View* TabContentsContainerView::GetFocusTraversableParentView() {
void TabContentsContainerView::Focus() {
if (tab_contents_ && !tab_contents_->GetContentsRootView()) {
// Set the native focus on the actual content of the tab.
- ::SetFocus(tab_contents_->GetContentHWND());
+ ::SetFocus(tab_contents_->GetContentNativeView());
}
}
diff --git a/chrome/browser/views/tabs/dragged_tab_controller.cc b/chrome/browser/views/tabs/dragged_tab_controller.cc
index 7464b92..806faeb 100644
--- a/chrome/browser/views/tabs/dragged_tab_controller.cc
+++ b/chrome/browser/views/tabs/dragged_tab_controller.cc
@@ -832,7 +832,7 @@ void DraggedTabController::Detach() {
// Set up the photo booth to start capturing the contents of the dragged
// TabContents.
if (!photobooth_.get())
- photobooth_.reset(new HWNDPhotobooth(dragged_contents_->GetContainerHWND()));
+ photobooth_.reset(new HWNDPhotobooth(dragged_contents_->GetNativeView()));
// Update the View. This NULL check is necessary apparently in some
// conditions during automation where the view_ is destroyed inside a
@@ -1111,7 +1111,7 @@ bool DraggedTabController::CompleteDrag() {
void DraggedTabController::EnsureDraggedView() {
if (!view_.get()) {
RECT wr;
- GetWindowRect(dragged_contents_->GetContainerHWND(), &wr);
+ GetWindowRect(dragged_contents_->GetNativeView(), &wr);
view_.reset(new DraggedTabView(dragged_contents_, mouse_offset_,
gfx::Size(wr.right - wr.left, wr.bottom - wr.top)));