summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
authorben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-21 20:51:20 +0000
committerben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-21 20:51:20 +0000
commita0dde12f2e4f92f1a59885c45cfecd10dbfdfdfd (patch)
treed8283a980977f11c43542016d57f698d3a83b73d /chrome/browser
parent933cc00eb856db684b9e64b7486ca20edbb2c3ea (diff)
downloadchromium_src-a0dde12f2e4f92f1a59885c45cfecd10dbfdfdfd.zip
chromium_src-a0dde12f2e4f92f1a59885c45cfecd10dbfdfdfd.tar.gz
chromium_src-a0dde12f2e4f92f1a59885c45cfecd10dbfdfdfd.tar.bz2
Rename Container->Widget
R=erg review url = http://codereview.chromium.org/11348/show git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5849 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/automation/automation_provider.cc2
-rw-r--r--chrome/browser/automation/ui_controls.cc2
-rw-r--r--chrome/browser/bookmarks/bookmark_context_menu.cc1
-rw-r--r--chrome/browser/browser_uitest.cc1
-rw-r--r--chrome/browser/debugger/debugger_view.cc2
-rw-r--r--chrome/browser/external_tab_container.cc2
-rw-r--r--chrome/browser/external_tab_container.h6
-rw-r--r--chrome/browser/history_view.cc10
-rw-r--r--chrome/browser/native_ui_contents.cc4
-rw-r--r--chrome/browser/native_ui_contents.h4
-rw-r--r--chrome/browser/render_widget_host_view_win.cc2
-rw-r--r--chrome/browser/tab_contents.cc4
-rw-r--r--chrome/browser/task_manager.cc2
-rw-r--r--chrome/browser/views/blocked_popup_container.cc6
-rw-r--r--chrome/browser/views/blocked_popup_container.h6
-rw-r--r--chrome/browser/views/bookmark_bar_view.cc14
-rw-r--r--chrome/browser/views/bookmark_bubble_view.cc12
-rw-r--r--chrome/browser/views/bookmark_editor_view.cc3
-rw-r--r--chrome/browser/views/bookmark_manager_view.cc17
-rw-r--r--chrome/browser/views/constrained_window_impl.cc8
-rw-r--r--chrome/browser/views/dom_view.cc1
-rw-r--r--chrome/browser/views/download_item_view.cc4
-rw-r--r--chrome/browser/views/download_shelf_view.cc2
-rw-r--r--chrome/browser/views/download_started_animation.cc4
-rw-r--r--chrome/browser/views/download_started_animation.h4
-rw-r--r--chrome/browser/views/download_tab_view.cc6
-rw-r--r--chrome/browser/views/find_bar_view.cc2
-rw-r--r--chrome/browser/views/find_bar_win.cc14
-rw-r--r--chrome/browser/views/find_bar_win.h6
-rw-r--r--chrome/browser/views/frame/aero_glass_frame.cc2
-rw-r--r--chrome/browser/views/frame/aero_glass_frame.h2
-rw-r--r--chrome/browser/views/frame/aero_glass_non_client_view.cc4
-rw-r--r--chrome/browser/views/frame/browser_view.cc24
-rw-r--r--chrome/browser/views/frame/opaque_frame.cc2
-rw-r--r--chrome/browser/views/frame/opaque_frame.h2
-rw-r--r--chrome/browser/views/frame/opaque_non_client_view.cc2
-rw-r--r--chrome/browser/views/hung_renderer_view.cc2
-rw-r--r--chrome/browser/views/hwnd_html_view.cc6
-rw-r--r--chrome/browser/views/info_bar_item_view.cc4
-rw-r--r--chrome/browser/views/info_bubble.cc4
-rw-r--r--chrome/browser/views/info_bubble.h4
-rw-r--r--chrome/browser/views/keyword_editor_view.cc5
-rw-r--r--chrome/browser/views/location_bar_view.cc17
-rw-r--r--chrome/browser/views/options/advanced_contents_view.cc2
-rw-r--r--chrome/browser/views/options/content_page_view.cc4
-rw-r--r--chrome/browser/views/options/fonts_page_view.cc4
-rw-r--r--chrome/browser/views/options/languages_page_view.cc6
-rw-r--r--chrome/browser/views/options/options_page_view.cc8
-rw-r--r--chrome/browser/views/shelf_item_dialog.cc2
-rw-r--r--chrome/browser/views/status_bubble.cc10
-rw-r--r--chrome/browser/views/status_bubble.h10
-rw-r--r--chrome/browser/views/tab_contents_container_view.cc4
-rw-r--r--chrome/browser/views/tabs/dragged_tab_controller.cc18
-rw-r--r--chrome/browser/views/tabs/dragged_tab_view.cc6
-rw-r--r--chrome/browser/views/tabs/dragged_tab_view.h4
-rw-r--r--chrome/browser/views/tabs/hwnd_photobooth.cc4
-rw-r--r--chrome/browser/views/tabs/hwnd_photobooth.h4
-rw-r--r--chrome/browser/views/tabs/tab.cc4
-rw-r--r--chrome/browser/views/tabs/tab_strip.cc10
-rw-r--r--chrome/browser/views/tabs/tab_strip.h4
-rw-r--r--chrome/browser/views/toolbar_view.cc28
-rw-r--r--chrome/browser/views/user_data_dir_dialog.cc2
-rw-r--r--chrome/browser/web_contents_view_win.cc4
-rw-r--r--chrome/browser/web_contents_view_win.h6
64 files changed, 183 insertions, 192 deletions
diff --git a/chrome/browser/automation/automation_provider.cc b/chrome/browser/automation/automation_provider.cc
index e11a3ce..800e5fb 100644
--- a/chrome/browser/automation/automation_provider.cc
+++ b/chrome/browser/automation/automation_provider.cc
@@ -1152,7 +1152,7 @@ void AutomationProvider::WindowGetViewBounds(const IPC::Message& message,
void* iter = NULL;
if (window_tracker_->ContainsHandle(handle)) {
HWND hwnd = window_tracker_->GetResource(handle);
- views::RootView* root_view = views::ContainerWin::FindRootView(hwnd);
+ views::RootView* root_view = views::WidgetWin::FindRootView(hwnd);
if (root_view) {
views::View* view = root_view->GetViewByID(view_id);
if (view) {
diff --git a/chrome/browser/automation/ui_controls.cc b/chrome/browser/automation/ui_controls.cc
index c557ff7..58b85f6 100644
--- a/chrome/browser/automation/ui_controls.cc
+++ b/chrome/browser/automation/ui_controls.cc
@@ -335,7 +335,7 @@ bool SendMouseClick(MouseButton type) {
void MoveMouseToCenterAndPress(views::View* view, MouseButton button,
int state, Task* task) {
DCHECK(view);
- DCHECK(view->GetContainer());
+ DCHECK(view->GetWidget());
gfx::Point view_center(view->width() / 2, view->height() / 2);
views::View::ConvertPointToScreen(view, &view_center);
SendMouseMove(view_center.x(), view_center.y());
diff --git a/chrome/browser/bookmarks/bookmark_context_menu.cc b/chrome/browser/bookmarks/bookmark_context_menu.cc
index 9cdacbf..a4a1607 100644
--- a/chrome/browser/bookmarks/bookmark_context_menu.cc
+++ b/chrome/browser/bookmarks/bookmark_context_menu.cc
@@ -19,7 +19,6 @@
#include "chrome/common/l10n_util.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/pref_service.h"
-#include "chrome/views/container.h"
#include "chrome/views/window.h"
#include "generated_resources.h"
diff --git a/chrome/browser/browser_uitest.cc b/chrome/browser/browser_uitest.cc
index f564d4f..3bbffe1 100644
--- a/chrome/browser/browser_uitest.cc
+++ b/chrome/browser/browser_uitest.cc
@@ -12,7 +12,6 @@
#include "chrome/test/automation/tab_proxy.h"
#include "chrome/test/automation/window_proxy.h"
#include "chrome/test/ui/ui_test.h"
-#include "chrome/views/container.h"
#include "net/base/net_util.h"
#include "net/url_request/url_request_unittest.h"
diff --git a/chrome/browser/debugger/debugger_view.cc b/chrome/browser/debugger/debugger_view.cc
index 169be19..6b59cd6 100644
--- a/chrome/browser/debugger/debugger_view.cc
+++ b/chrome/browser/debugger/debugger_view.cc
@@ -51,7 +51,7 @@ void DebuggerView::ViewHierarchyChanged(bool is_add,
views::View* parent,
views::View* child) {
if (is_add && child == this) {
- DCHECK(GetContainer());
+ DCHECK(GetWidget());
OnInit();
}
}
diff --git a/chrome/browser/external_tab_container.cc b/chrome/browser/external_tab_container.cc
index 62aec65..b52da83 100644
--- a/chrome/browser/external_tab_container.cc
+++ b/chrome/browser/external_tab_container.cc
@@ -14,7 +14,7 @@
#include "chrome/common/chrome_constants.h"
#include "chrome/common/win_util.h"
// Included for SetRootViewForHWND.
-#include "chrome/views/container_win.h"
+#include "chrome/views/widget_win.h"
#include "chrome/test/automation/automation_messages.h"
static const wchar_t kWindowObjectKey[] = L"ChromeWindowObject";
diff --git a/chrome/browser/external_tab_container.h b/chrome/browser/external_tab_container.h
index bb8b21f..2ae64fbd 100644
--- a/chrome/browser/external_tab_container.h
+++ b/chrome/browser/external_tab_container.h
@@ -15,9 +15,9 @@
#include "chrome/common/chrome_constants.h"
#include "chrome/common/notification_registrar.h"
#include "chrome/common/notification_service.h"
-#include "chrome/views/container.h"
#include "chrome/views/focus_manager.h"
#include "chrome/views/root_view.h"
+#include "chrome/views/widget.h"
class AutomationProvider;
class TabContents;
@@ -30,7 +30,7 @@ class TabContentsContainerView;
// It also implements Container
class ExternalTabContainer : public TabContentsDelegate,
public NotificationObserver,
- public views::Container,
+ public views::Widget,
public views::KeystrokeListener,
public CWindowImpl<ExternalTabContainer,
CWindow,
@@ -85,7 +85,7 @@ class ExternalTabContainer : public TabContentsDelegate,
const NotificationDetails& details);
////////////////////////////////////////////////////////////////////////////////
- // views::Container
+ // views::Widget
////////////////////////////////////////////////////////////////////////////////
virtual void GetBounds(CRect *out, bool including_frame) const;
virtual void MoveToFront(bool should_activate);
diff --git a/chrome/browser/history_view.cc b/chrome/browser/history_view.cc
index 17a3e77..4cec25f 100644
--- a/chrome/browser/history_view.cc
+++ b/chrome/browser/history_view.cc
@@ -22,8 +22,8 @@
#include "chrome/common/resource_bundle.h"
#include "chrome/common/time_format.h"
#include "chrome/common/win_util.h"
-#include "chrome/views/container.h"
#include "chrome/views/link.h"
+#include "chrome/views/widget.h"
#include "generated_resources.h"
@@ -566,7 +566,7 @@ void HistoryItemRenderer::StarStateChanged(bool state) {
gfx::Rect star_bounds(star_location.x(), star_location.y() + 4,
star_toggle_->width(),
star_toggle_->height());
- HWND parent = GetContainer()->GetHWND();
+ HWND parent = GetWidget()->GetHWND();
Profile* profile = model_->profile();
GURL url = model_->GetURL(model_index_);
@@ -839,8 +839,8 @@ views::VariableRowHeightScrollHelper::RowInfo
}
bool HistoryView::IsVisible() {
- views::Container* vc = GetContainer();
- return vc && vc->IsVisible();
+ views::Widget* widget = GetWidget();
+ return widget && widget->IsVisible();
}
void HistoryView::DidChangeBounds(const gfx::Rect& previous,
@@ -1246,7 +1246,7 @@ void HistoryView::DeleteDayAtModelIndex(int index) {
IDS_HISTORY_DELETE_PRIOR_VISITS_WARNING_TITLE);
UINT flags = MB_OKCANCEL | MB_ICONWARNING | MB_TOPMOST | MB_SETFOREGROUND;
- if (win_util::MessageBox(GetContainer()->GetHWND(),
+ if (win_util::MessageBox(GetWidget()->GetHWND(),
text, caption, flags) != IDOK) {
return;
}
diff --git a/chrome/browser/native_ui_contents.cc b/chrome/browser/native_ui_contents.cc
index 0c87e8b..52e09076 100644
--- a/chrome/browser/native_ui_contents.cc
+++ b/chrome/browser/native_ui_contents.cc
@@ -16,12 +16,12 @@
#include "chrome/common/resource_bundle.h"
#include "chrome/views/background.h"
#include "chrome/views/checkbox.h"
-#include "chrome/views/container_win.h"
#include "chrome/views/grid_layout.h"
#include "chrome/views/image_view.h"
#include "chrome/views/root_view.h"
#include "chrome/views/scroll_view.h"
#include "chrome/views/throbber.h"
+#include "chrome/views/widget_win.h"
#include "generated_resources.h"
@@ -150,7 +150,7 @@ NativeUIContents::~NativeUIContents() {
void NativeUIContents::CreateView() {
set_delete_on_destroy(false);
- ContainerWin::Init(GetDesktopWindow(), gfx::Rect(), false);
+ WidgetWin::Init(GetDesktopWindow(), gfx::Rect(), false);
}
LRESULT NativeUIContents::OnCreate(LPCREATESTRUCT create_struct) {
diff --git a/chrome/browser/native_ui_contents.h b/chrome/browser/native_ui_contents.h
index 6b15ec5..d6de98c 100644
--- a/chrome/browser/native_ui_contents.h
+++ b/chrome/browser/native_ui_contents.h
@@ -8,10 +8,10 @@
#include "chrome/browser/page_state.h"
#include "chrome/browser/tab_contents.h"
#include "chrome/views/background.h"
-#include "chrome/views/container_win.h"
#include "chrome/views/link.h"
#include "chrome/views/native_button.h"
#include "chrome/views/text_field.h"
+#include "chrome/views/widget_win.h"
namespace views {
class CheckBox;
@@ -33,7 +33,7 @@ class NativeUI;
//
////////////////////////////////////////////////////////////////////////////////
class NativeUIContents : public TabContents,
- public views::ContainerWin {
+ public views::WidgetWin {
public:
explicit NativeUIContents(Profile* profile);
diff --git a/chrome/browser/render_widget_host_view_win.cc b/chrome/browser/render_widget_host_view_win.cc
index e24ecbe..d530e5d 100644
--- a/chrome/browser/render_widget_host_view_win.cc
+++ b/chrome/browser/render_widget_host_view_win.cc
@@ -23,7 +23,7 @@
#include "chrome/common/plugin_messages.h"
#include "chrome/common/win_util.h"
// Included for views::kReflectedMessage - TODO(beng): move this to win_util.h!
-#include "chrome/views/container_win.h"
+#include "chrome/views/widget_win.h"
#include "webkit/glue/webcursor.h"
using base::TimeDelta;
diff --git a/chrome/browser/tab_contents.cc b/chrome/browser/tab_contents.cc
index ec3c8af..e5131dc 100644
--- a/chrome/browser/tab_contents.cc
+++ b/chrome/browser/tab_contents.cc
@@ -14,11 +14,11 @@
#include "chrome/common/l10n_util.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/pref_service.h"
-#include "chrome/views/container.h"
#include "chrome/views/native_scroll_bar.h"
#include "chrome/views/root_view.h"
#include "chrome/views/view.h"
#include "chrome/views/view_storage.h"
+#include "chrome/views/widget.h"
#include "generated_resources.h"
@@ -347,7 +347,7 @@ void TabContents::StoreFocus() {
if (container_hwnd) {
views::View* focused_view = focus_manager->GetFocusedView();
if (focused_view) {
- HWND hwnd = focused_view->GetRootView()->GetContainer()->GetHWND();
+ HWND hwnd = focused_view->GetRootView()->GetWidget()->GetHWND();
if (container_hwnd == hwnd || ::IsChild(container_hwnd, hwnd))
focus_manager->ClearFocus();
}
diff --git a/chrome/browser/task_manager.cc b/chrome/browser/task_manager.cc
index b1994da..009d44c 100644
--- a/chrome/browser/task_manager.cc
+++ b/chrome/browser/task_manager.cc
@@ -915,7 +915,7 @@ void TaskManagerContents::ShowContextMenu(views::View* source,
int y,
bool is_mouse_gesture) {
UpdateStatsCounters();
- Menu menu(this, Menu::TOPLEFT, source->GetContainer()->GetHWND());
+ Menu menu(this, Menu::TOPLEFT, source->GetWidget()->GetHWND());
for (std::vector<views::TableColumn>::iterator i =
columns_.begin(); i != columns_.end(); ++i) {
menu.AppendMenuItem(i->id, i->title, Menu::CHECKBOX);
diff --git a/chrome/browser/views/blocked_popup_container.cc b/chrome/browser/views/blocked_popup_container.cc
index 6d9320e..63f6eb8 100644
--- a/chrome/browser/views/blocked_popup_container.cc
+++ b/chrome/browser/views/blocked_popup_container.cc
@@ -457,11 +457,11 @@ void BlockedPopupContainer::AnimateToState(double state) {
}
////////////////////////////////////////////////////////////////////////////////
-// Override from views::ContainerWin:
+// Override from views::WidgetWin:
void BlockedPopupContainer::OnFinalMessage(HWND window) {
owner_->WillClose(this);
CloseEachTabContents();
- ContainerWin::OnFinalMessage(window);
+ WidgetWin::OnFinalMessage(window);
}
void BlockedPopupContainer::OnSize(UINT param, const CSize& size) {
@@ -482,7 +482,7 @@ void BlockedPopupContainer::Init(const gfx::Point& initial_anchor) {
container_view_->SetVisible(true);
set_window_style(WS_CHILD | WS_CLIPSIBLINGS | WS_CLIPCHILDREN);
- ContainerWin::Init(owner_->GetContainerHWND(), gfx::Rect(), false);
+ WidgetWin::Init(owner_->GetContainerHWND(), gfx::Rect(), false);
SetContentsView(container_view_);
RepositionConstrainedWindowTo(initial_anchor);
diff --git a/chrome/browser/views/blocked_popup_container.h b/chrome/browser/views/blocked_popup_container.h
index 0ae552e..12800c7 100644
--- a/chrome/browser/views/blocked_popup_container.h
+++ b/chrome/browser/views/blocked_popup_container.h
@@ -13,7 +13,7 @@
#include "chrome/browser/tab_contents_delegate.h"
#include "chrome/common/animation.h"
#include "chrome/common/pref_member.h"
-#include "chrome/views/container_win.h"
+#include "chrome/views/widget_win.h"
class BlockedPopupContainerView;
class Profile;
@@ -30,7 +30,7 @@ class TextButton;
//
class BlockedPopupContainer : public ConstrainedWindow,
public TabContentsDelegate,
- public views::ContainerWin,
+ public views::WidgetWin,
public Animation {
public:
virtual ~BlockedPopupContainer();
@@ -101,7 +101,7 @@ class BlockedPopupContainer : public ConstrainedWindow,
virtual void AnimateToState(double state);
protected:
- // Override from views::ContainerWin:
+ // Override from views::WidgetWin:
virtual void OnFinalMessage(HWND window);
virtual void OnSize(UINT param, const CSize& size);
diff --git a/chrome/browser/views/bookmark_bar_view.cc b/chrome/browser/views/bookmark_bar_view.cc
index 49e758d6..aaca5af 100644
--- a/chrome/browser/views/bookmark_bar_view.cc
+++ b/chrome/browser/views/bookmark_bar_view.cc
@@ -39,10 +39,10 @@
#include "chrome/common/resource_bundle.h"
#include "chrome/common/win_util.h"
#include "chrome/views/chrome_menu.h"
-#include "chrome/views/container.h"
#include "chrome/views/menu_button.h"
#include "chrome/views/tooltip_manager.h"
#include "chrome/views/view_constants.h"
+#include "chrome/views/widget.h"
#include "chrome/views/window.h"
#include "generated_resources.h"
@@ -532,7 +532,7 @@ class MenuRunner : public views::MenuDelegate,
std::vector<BookmarkNode*> nodes;
nodes.push_back(menu_id_to_node_map_[id]);
context_menu_.reset(
- new BookmarkContextMenu(view_->GetContainer()->GetHWND(),
+ new BookmarkContextMenu(view_->GetWidget()->GetHWND(),
view_->GetProfile(),
view_->browser(),
view_->GetPageNavigator(),
@@ -1403,7 +1403,7 @@ void BookmarkBarView::RunMenu(views::View* view,
gfx::Point screen_loc(x, 0);
View::ConvertPointToScreen(this, &screen_loc);
menu_runner_.reset(new MenuRunner(this, node, start_index));
- HWND parent_hwnd = GetContainer()->GetHWND();
+ HWND parent_hwnd = GetWidget()->GetHWND();
menu_runner_->RunMenuAt(parent_hwnd,
gfx::Rect(screen_loc.x(), screen_loc.y(),
view->width(), bar_height),
@@ -1428,7 +1428,7 @@ void BookmarkBarView::ButtonPressed(views::BaseButton* sender) {
PageTransition::AUTO_BOOKMARK);
} else {
bookmark_utils::OpenAll(
- GetContainer()->GetHWND(), profile_, GetPageNavigator(), node,
+ GetWidget()->GetHWND(), profile_, GetPageNavigator(), node,
event_utils::DispositionFromEventFlags(sender->mouse_event_flags()));
}
UserMetrics::RecordAction(L"ClickedBookmarkBarURLButton", profile_);
@@ -1463,7 +1463,7 @@ void BookmarkBarView::ShowContextMenu(View* source,
} else {
parent = model_->GetBookmarkBarNode();
}
- BookmarkContextMenu controller(GetContainer()->GetHWND(),
+ BookmarkContextMenu controller(GetWidget()->GetHWND(),
GetProfile(), browser(), GetPageNavigator(),
parent, nodes,
BookmarkContextMenu::BOOKMARK_BAR);
@@ -1598,7 +1598,7 @@ void BookmarkBarView::ShowDropFolderForNode(BookmarkNode* node) {
gfx::Point screen_loc;
View::ConvertPointToScreen(view_to_position_menu_from, &screen_loc);
drop_menu_runner_->RunMenuAt(
- GetContainer()->GetHWND(),
+ GetWidget()->GetHWND(),
gfx::Rect(screen_loc.x(), screen_loc.y(),
view_to_position_menu_from->width(),
view_to_position_menu_from->height()),
@@ -1807,7 +1807,7 @@ void BookmarkBarView::StartThrobbing() {
if (bubble_url_.is_empty())
return; // Bubble isn't showing; nothing to throb.
- if (!GetContainer())
+ if (!GetWidget())
return; // We're not showing, don't do anything.
BookmarkNode* node = model_->GetMostRecentlyAddedNodeForURL(bubble_url_);
diff --git a/chrome/browser/views/bookmark_bubble_view.cc b/chrome/browser/views/bookmark_bubble_view.cc
index d32d3f3..a15e939 100644
--- a/chrome/browser/views/bookmark_bubble_view.cc
+++ b/chrome/browser/views/bookmark_bubble_view.cc
@@ -136,9 +136,9 @@ void BookmarkBubbleView::DidChangeBounds(const gfx::Rect& previous,
}
void BookmarkBubbleView::BubbleShown() {
- DCHECK(GetContainer());
+ DCHECK(GetWidget());
views::FocusManager* focus_manager =
- views::FocusManager::GetFocusManager(GetContainer()->GetHWND());
+ views::FocusManager::GetFocusManager(GetWidget()->GetHWND());
focus_manager->RegisterAccelerator(
views::Accelerator(VK_RETURN, false, false, false), this);
@@ -316,7 +316,7 @@ bool BookmarkBubbleView::CloseOnEscape() {
}
void BookmarkBubbleView::Close() {
- static_cast<InfoBubble*>(GetContainer())->Close();
+ static_cast<InfoBubble*>(GetWidget())->Close();
}
void BookmarkBubbleView::RemoveBookmark() {
@@ -342,16 +342,16 @@ void BookmarkBubbleView::ShowEditor() {
// Parent the editor to our root ancestor (not the root we're in, as that
// is the info bubble and will close shortly).
- HWND parent = GetAncestor(GetContainer()->GetHWND(), GA_ROOTOWNER);
+ HWND parent = GetAncestor(GetWidget()->GetHWND(), GA_ROOTOWNER);
// We're about to show the bookmark editor. When the bookmark editor closes
- // we want the browser to become active. ContainerWin::Hide() does a hide in
+ // we want the browser to become active. WidgetWin::Hide() does a hide in
// a such way that activation isn't changed, which means when we close
// Windows gets confused as to who it should give active status to. We
// explicitly hide the bookmark bubble window in such a way that activation
// status changes. That way, when the editor closes, activation is properly
// restored to the browser.
- ShowWindow(GetContainer()->GetHWND(), SW_HIDE);
+ ShowWindow(GetWidget()->GetHWND(), SW_HIDE);
// Even though we just hid the window, we need to invoke Close to schedule
// the delete and all that.
diff --git a/chrome/browser/views/bookmark_editor_view.cc b/chrome/browser/views/bookmark_editor_view.cc
index db8d5ec..eccca6d 100644
--- a/chrome/browser/views/bookmark_editor_view.cc
+++ b/chrome/browser/views/bookmark_editor_view.cc
@@ -221,8 +221,7 @@ void BookmarkEditorView::ShowContextMenu(View* source,
running_menu_for_root_ =
(tree_model_->GetParent(tree_view_->GetSelectedNode()) ==
tree_model_->GetRoot());
- context_menu_.reset(new Menu(this, Menu::TOPLEFT,
- GetContainer()->GetHWND()));
+ context_menu_.reset(new Menu(this, Menu::TOPLEFT, GetWidget()->GetHWND()));
context_menu_->AppendMenuItemWithLabel(IDS_EDIT,
l10n_util::GetString(IDS_EDIT));
context_menu_->AppendMenuItemWithLabel(
diff --git a/chrome/browser/views/bookmark_manager_view.cc b/chrome/browser/views/bookmark_manager_view.cc
index fc36cd6..ae9973a 100644
--- a/chrome/browser/views/bookmark_manager_view.cc
+++ b/chrome/browser/views/bookmark_manager_view.cc
@@ -27,7 +27,6 @@
#include "chrome/common/pref_names.h"
#include "chrome/common/pref_service.h"
#include "chrome/common/win_util.h"
-#include "chrome/views/container_win.h"
#include "chrome/views/grid_layout.h"
#include "chrome/views/menu_button.h"
#include "chrome/views/single_split_view.h"
@@ -338,7 +337,7 @@ void BookmarkManagerView::OnDoubleClick() {
// we can use
// event_utils::DispositionFromEventFlags(sender->mouse_event_flags()) .
bookmark_utils::OpenAll(
- GetContainer()->GetHWND(), profile_, NULL, nodes, CURRENT_TAB);
+ GetWidget()->GetHWND(), profile_, NULL, nodes, CURRENT_TAB);
}
void BookmarkManagerView::OnTableViewDelete(views::TableView* table) {
@@ -359,7 +358,7 @@ void BookmarkManagerView::OnKeyDown(unsigned short virtual_keycode) {
SelectInTree(selected_nodes[0]);
} else {
bookmark_utils::OpenAll(
- GetContainer()->GetHWND(), profile_, NULL, selected_nodes,
+ GetWidget()->GetHWND(), profile_, NULL, selected_nodes,
CURRENT_TAB);
}
break;
@@ -463,7 +462,7 @@ void BookmarkManagerView::ShowContextMenu(views::View* source,
bool is_mouse_gesture) {
DCHECK(source == table_view_ || source == tree_view_);
bool is_table = (source == table_view_);
- ShowMenu(GetContainer()->GetHWND(), x, y,
+ ShowMenu(GetWidget()->GetHWND(), x, y,
is_table ? BookmarkContextMenu::BOOKMARK_MANAGER_TABLE :
BookmarkContextMenu::BOOKMARK_MANAGER_TREE);
}
@@ -514,7 +513,7 @@ void BookmarkManagerView::FileSelected(const std::wstring& path,
ProfileInfo profile_info;
profile_info.browser_type = BOOKMARKS_HTML;
profile_info.source_path = path;
- StartImportingWithUI(GetContainer()->GetHWND(), FAVORITES, host,
+ StartImportingWithUI(GetWidget()->GetHWND(), FAVORITES, host,
profile_info, profile_,
new ImportObserverImpl(profile()), false);
} else if (id == IDS_BOOKMARK_MANAGER_EXPORT_MENU) {
@@ -640,7 +639,7 @@ void BookmarkManagerView::ShowMenu(
std::vector<BookmarkNode*> nodes;
if (node)
nodes.push_back(node);
- BookmarkContextMenu menu(GetContainer()->GetHWND(), profile_, NULL, NULL,
+ BookmarkContextMenu menu(GetWidget()->GetHWND(), profile_, NULL, NULL,
node, nodes, config);
menu.RunMenuAt(x, y);
}
@@ -679,7 +678,7 @@ void BookmarkManagerView::ShowToolsMenu(HWND host, int x, int y) {
menu.AppendMenuItemWithLabel(
IDS_BOOKMARK_MANAGER_EXPORT_MENU,
l10n_util::GetString(IDS_BOOKMARK_MANAGER_EXPORT_MENU));
- menu.RunMenuAt(GetContainer()->GetHWND(), gfx::Rect(x, y, 0, 0),
+ menu.RunMenuAt(GetWidget()->GetHWND(), gfx::Rect(x, y, 0, 0),
views::MenuItemView::TOPLEFT, true);
}
@@ -696,7 +695,7 @@ void BookmarkManagerView::ShowImportBookmarksFileChooser() {
select_file_dialog_ = SelectFileDialog::Create(this);
select_file_dialog_->SelectFile(
SelectFileDialog::SELECT_OPEN_FILE, std::wstring(), L"bookmarks.html",
- filter_string, std::wstring(), GetContainer()->GetHWND(),
+ filter_string, std::wstring(), GetWidget()->GetHWND(),
reinterpret_cast<void*>(IDS_BOOKMARK_MANAGER_IMPORT_MENU));
}
@@ -708,6 +707,6 @@ void BookmarkManagerView::ShowExportBookmarksFileChooser() {
select_file_dialog_->SelectFile(
SelectFileDialog::SELECT_SAVEAS_FILE, std::wstring(), L"bookmarks.html",
win_util::GetFileFilterFromPath(L"bookmarks.html"), L"html",
- GetContainer()->GetHWND(),
+ GetWidget()->GetHWND(),
reinterpret_cast<void*>(IDS_BOOKMARK_MANAGER_EXPORT_MENU));
}
diff --git a/chrome/browser/views/constrained_window_impl.cc b/chrome/browser/views/constrained_window_impl.cc
index d504585..43e6b3a9 100644
--- a/chrome/browser/views/constrained_window_impl.cc
+++ b/chrome/browser/views/constrained_window_impl.cc
@@ -465,10 +465,10 @@ gfx::Size ConstrainedWindowNonClientView::GetPreferredSize() {
void ConstrainedWindowNonClientView::ViewHierarchyChanged(bool is_add,
View *parent,
View *child) {
- if (is_add && GetContainer()) {
+ if (is_add && GetWidget()) {
// Add our Client View as we are added to the Container so that if we are
// subsequently resized all the parent-child relationships are established.
- if (is_add && GetContainer() && child == this)
+ if (is_add && GetWidget() && child == this)
AddChildView(container_->client_view());
}
}
@@ -677,7 +677,7 @@ void ConstrainedWindowImpl::UpdateUI(unsigned int changed_flags) {
}
////////////////////////////////////////////////////////////////////////////////
-// ConstrainedWindowImpl, views::ContainerWin overrides:
+// ConstrainedWindowImpl, views::WidgetWin overrides:
void ConstrainedWindowImpl::OnDestroy() {
// We do this here, rather than |Close|, since the window may be destroyed in
@@ -709,7 +709,7 @@ void ConstrainedWindowImpl::OnFinalMessage(HWND window) {
// list.
owner_->WillClose(this);
- ContainerWin::OnFinalMessage(window);
+ WidgetWin::OnFinalMessage(window);
}
void ConstrainedWindowImpl::OnGetMinMaxInfo(LPMINMAXINFO mm_info) {
diff --git a/chrome/browser/views/dom_view.cc b/chrome/browser/views/dom_view.cc
index ba74fac..ed8fa95 100644
--- a/chrome/browser/views/dom_view.cc
+++ b/chrome/browser/views/dom_view.cc
@@ -5,7 +5,6 @@
#include "chrome/browser/views/dom_view.h"
#include "chrome/browser/dom_ui/dom_ui_host.h"
-#include "chrome/views/container.h"
DOMView::DOMView(const GURL& contents)
: contents_(contents), initialized_(false), host_(NULL) {
diff --git a/chrome/browser/views/download_item_view.cc b/chrome/browser/views/download_item_view.cc
index ab21fe2..f3e4a2a 100644
--- a/chrome/browser/views/download_item_view.cc
+++ b/chrome/browser/views/download_item_view.cc
@@ -17,9 +17,9 @@
#include "chrome/common/l10n_util.h"
#include "chrome/common/resource_bundle.h"
#include "chrome/common/win_util.h"
-#include "chrome/views/container.h"
#include "chrome/views/native_button.h"
#include "chrome/views/root_view.h"
+#include "chrome/views/widget.h"
#include "generated_resources.h"
@@ -659,7 +659,7 @@ bool DownloadItemView::OnMousePressed(const views::MouseEvent& event) {
views::View::ConvertPointToScreen(this, &point);
download_util::DownloadShelfContextMenu menu(download_,
- GetContainer()->GetHWND(),
+ GetWidget()->GetHWND(),
model_.get(),
point.ToPOINT());
drop_down_pressed_ = false;
diff --git a/chrome/browser/views/download_shelf_view.cc b/chrome/browser/views/download_shelf_view.cc
index 4190d78..cb5ef66 100644
--- a/chrome/browser/views/download_shelf_view.cc
+++ b/chrome/browser/views/download_shelf_view.cc
@@ -204,7 +204,7 @@ void DownloadShelfView::Layout() {
// another tab (that doesn't have a download shelf) _before_ the download
// has started and we'll crash when calling SetVisible() below because
// the NativeControlContainer ctor tries to use the Container.
- if (!GetContainer())
+ if (!GetWidget())
return;
gfx::Size image_size = arrow_image_->GetPreferredSize();
diff --git a/chrome/browser/views/download_started_animation.cc b/chrome/browser/views/download_started_animation.cc
index e716317..001208d 100644
--- a/chrome/browser/views/download_started_animation.cc
+++ b/chrome/browser/views/download_started_animation.cc
@@ -7,7 +7,7 @@
#include "chrome/app/theme/theme_resources.h"
#include "chrome/browser/tab_contents.h"
#include "chrome/common/resource_bundle.h"
-#include "chrome/views/container_win.h"
+#include "chrome/views/widget_win.h"
// How long to spend moving downwards and fading out after waiting.
static const int kMoveTimeMs = 600;
@@ -44,7 +44,7 @@ DownloadStartedAnimation::DownloadStartedAnimation(TabContents* tab_contents)
SetImage(kDownloadImage);
gfx::Rect rc(0, 0, 0, 0);
- popup_ = new views::ContainerWin;
+ popup_ = new views::WidgetWin;
popup_->set_window_style(WS_POPUP);
popup_->set_window_ex_style(WS_EX_LAYERED | WS_EX_TOOLWINDOW |
WS_EX_TRANSPARENT);
diff --git a/chrome/browser/views/download_started_animation.h b/chrome/browser/views/download_started_animation.h
index 9ad3528..c097ca9 100644
--- a/chrome/browser/views/download_started_animation.h
+++ b/chrome/browser/views/download_started_animation.h
@@ -11,7 +11,7 @@
#include "chrome/views/image_view.h"
namespace views {
-class ContainerWin;
+class WidgetWin;
};
class TabContents;
@@ -42,7 +42,7 @@ class DownloadStartedAnimation : public Animation,
const NotificationDetails& details);
// We use a HWND for the popup so that it may float above any HWNDs in our UI.
- views::ContainerWin* popup_;
+ views::WidgetWin* popup_;
// The content area holding us.
TabContents* tab_contents_;
diff --git a/chrome/browser/views/download_tab_view.cc b/chrome/browser/views/download_tab_view.cc
index 6528fa5..6a83bd8 100644
--- a/chrome/browser/views/download_tab_view.cc
+++ b/chrome/browser/views/download_tab_view.cc
@@ -716,7 +716,7 @@ bool DownloadItemTabView::OnMousePressed(const views::MouseEvent& event) {
views::View::ConvertPointToScreen(this, &point);
download_util::DownloadDestinationContextMenu menu(
- model_, GetContainer()->GetHWND(), point.ToPOINT());
+ model_, GetWidget()->GetHWND(), point.ToPOINT());
}
} else {
parent_->ItemBecameSelected(NULL);
@@ -758,8 +758,8 @@ bool DownloadItemTabView::OnMouseDragged(const views::MouseEvent& event) {
void DownloadItemTabView::LinkActivated(views::Link* source, int event_flags) {
// There are several links in our view that could have been clicked:
if (source == file_name_) {
- views::Container* container = this->GetContainer();
- HWND parent_window = container ? container->GetHWND() : NULL;
+ views::Widget* widget = this->GetWidget();
+ HWND parent_window = widget ? widget->GetHWND() : NULL;
model_->manager()->OpenDownloadInShell(model_, parent_window);
} else if (source == pause_) {
model_->TogglePause();
diff --git a/chrome/browser/views/find_bar_view.cc b/chrome/browser/views/find_bar_view.cc
index a065c1b..d528096 100644
--- a/chrome/browser/views/find_bar_view.cc
+++ b/chrome/browser/views/find_bar_view.cc
@@ -250,7 +250,7 @@ void FindBarView::Paint(ChromeCanvas* canvas) {
// middle and right). Note, that the window region has been set by the
// controller, so the whitespace in the left and right background images is
// actually outside the window region and is therefore not drawn. See
- // FindInPageContainerWin::CreateRoundedWindowEdges() for details.
+ // FindInPageWidgetWin::CreateRoundedWindowEdges() for details.
const SkBitmap *bg_left =
toolbar_blend_ ? kDlgBackground_left : kDlgBackground_bb_left;
const SkBitmap *bg_middle =
diff --git a/chrome/browser/views/find_bar_win.cc b/chrome/browser/views/find_bar_win.cc
index d0c0889..4df9801 100644
--- a/chrome/browser/views/find_bar_win.cc
+++ b/chrome/browser/views/find_bar_win.cc
@@ -13,11 +13,11 @@
#include "chrome/browser/views/find_bar_view.h"
#include "chrome/browser/web_contents.h"
#include "chrome/browser/web_contents_view.h"
-#include "chrome/views/container_win.h"
#include "chrome/views/external_focus_tracker.h"
#include "chrome/views/native_scroll_bar.h"
#include "chrome/views/root_view.h"
#include "chrome/views/view_storage.h"
+#include "chrome/views/widget_win.h"
int FindBarWin::request_id_counter_ = 0;
@@ -42,9 +42,9 @@ FindBarWin::FindBarWin(WebContentsView* parent_tab, HWND parent_hwnd)
// own handler for Escape.
SetFocusChangeListener(parent_hwnd);
- // Don't let ContainerWin manage our lifetime. We want our lifetime to
+ // Don't let WidgetWin manage our lifetime. We want our lifetime to
// coincide with WebContents.
- ContainerWin::set_delete_on_destroy(false);
+ WidgetWin::set_delete_on_destroy(false);
view_ = new FindBarView(this);
@@ -60,7 +60,7 @@ FindBarWin::FindBarWin(WebContentsView* parent_tab, HWND parent_hwnd)
gfx::Rect find_dlg_rect = GetDialogPosition(gfx::Rect());
set_window_style(WS_CHILD | WS_CLIPCHILDREN);
set_window_ex_style(WS_EX_TOPMOST);
- ContainerWin::Init(parent_hwnd, find_dlg_rect, false);
+ WidgetWin::Init(parent_hwnd, find_dlg_rect, false);
SetContentsView(view_);
// Start the process of animating the opening of the window.
@@ -326,7 +326,7 @@ void FindBarWin::SetParent(HWND new_parent) {
}
////////////////////////////////////////////////////////////////////////////////
-// FindBarWin, views::ContainerWin implementation:
+// FindBarWin, views::WidgetWin implementation:
void FindBarWin::OnFinalMessage(HWND window) {
// We are exiting, so we no longer need to monitor focus changes.
@@ -483,12 +483,12 @@ void FindBarWin::GetDialogBounds(gfx::Rect* bounds) {
gfx::Rect toolbar_bounds, bookmark_bar_bounds;
if (toolbar) {
toolbar_bounds = toolbar->GetLocalBounds(false);
- // Need to convert toolbar bounds into Container coords because the toolbar
+ // Need to convert toolbar bounds into Widget coords because the toolbar
// is the child of another view that isn't the top level view. This is
// required to ensure correct positioning relative to the top,left of the
// window.
gfx::Point topleft;
- views::View::ConvertPointToContainer(toolbar, &topleft);
+ views::View::ConvertPointToWidget(toolbar, &topleft);
toolbar_bounds.Offset(topleft.x(), topleft.y());
}
diff --git a/chrome/browser/views/find_bar_win.h b/chrome/browser/views/find_bar_win.h
index bd3b06c..6cc6029 100644
--- a/chrome/browser/views/find_bar_win.h
+++ b/chrome/browser/views/find_bar_win.h
@@ -8,7 +8,7 @@
#include "base/gfx/rect.h"
#include "chrome/browser/render_view_host_delegate.h"
#include "chrome/common/animation.h"
-#include "chrome/views/container_win.h"
+#include "chrome/views/widget_win.h"
class FindBarView;
class RenderViewHost;
@@ -34,7 +34,7 @@ class View;
//
////////////////////////////////////////////////////////////////////////////////
class FindBarWin : public views::FocusChangeListener,
- public views::ContainerWin,
+ public views::WidgetWin,
public AnimationDelegate {
public:
FindBarWin(WebContentsView* parent_tab, HWND parent_hwnd);
@@ -113,7 +113,7 @@ class FindBarWin : public views::FocusChangeListener,
int active_match_ordinal,
bool final_update);
- // Overridden from views::ContainerWin:
+ // Overridden from views::WidgetWin:
virtual void OnFinalMessage(HWND window);
// Overridden from views::FocusChangeListener:
diff --git a/chrome/browser/views/frame/aero_glass_frame.cc b/chrome/browser/views/frame/aero_glass_frame.cc
index a24e274..5694163 100644
--- a/chrome/browser/views/frame/aero_glass_frame.cc
+++ b/chrome/browser/views/frame/aero_glass_frame.cc
@@ -91,7 +91,7 @@ views::Window* AeroGlassFrame::GetWindow() {
}
///////////////////////////////////////////////////////////////////////////////
-// AeroGlassFrame, views::ContainerWin overrides:
+// AeroGlassFrame, views::WidgetWin overrides:
bool AeroGlassFrame::AcceleratorPressed(views::Accelerator* accelerator) {
return browser_view_->AcceleratorPressed(*accelerator);
diff --git a/chrome/browser/views/frame/aero_glass_frame.h b/chrome/browser/views/frame/aero_glass_frame.h
index 86df734..7daa04a 100644
--- a/chrome/browser/views/frame/aero_glass_frame.h
+++ b/chrome/browser/views/frame/aero_glass_frame.h
@@ -39,7 +39,7 @@ class AeroGlassFrame : public BrowserFrame,
virtual views::Window* GetWindow();
protected:
- // Overridden from views::ContainerWin:
+ // Overridden from views::WidgetWin:
virtual bool AcceleratorPressed(views::Accelerator* accelerator);
virtual bool GetAccelerator(int cmd_id, views::Accelerator* accelerator);
virtual void OnInitMenuPopup(HMENU menu, UINT position, BOOL is_system_menu);
diff --git a/chrome/browser/views/frame/aero_glass_non_client_view.cc b/chrome/browser/views/frame/aero_glass_non_client_view.cc
index 8e6694b..2f5b18c 100644
--- a/chrome/browser/views/frame/aero_glass_non_client_view.cc
+++ b/chrome/browser/views/frame/aero_glass_non_client_view.cc
@@ -181,7 +181,7 @@ gfx::Size AeroGlassNonClientView::CalculateWindowSizeForClientSize(
CPoint AeroGlassNonClientView::GetSystemMenuPoint() const {
CPoint offset(0, 0);
- MapWindowPoints(GetContainer()->GetHWND(), HWND_DESKTOP, &offset, 1);
+ MapWindowPoints(GetWidget()->GetHWND(), HWND_DESKTOP, &offset, 1);
return offset;
}
@@ -260,7 +260,7 @@ void AeroGlassNonClientView::ViewHierarchyChanged(bool is_add,
views::View* parent,
views::View* child) {
if (is_add && child == this) {
- DCHECK(GetContainer());
+ DCHECK(GetWidget());
DCHECK(frame_->client_view()->GetParent() != this);
AddChildView(frame_->client_view());
}
diff --git a/chrome/browser/views/frame/browser_view.cc b/chrome/browser/views/frame/browser_view.cc
index 2b6af47..8dbeb98 100644
--- a/chrome/browser/views/frame/browser_view.cc
+++ b/chrome/browser/views/frame/browser_view.cc
@@ -318,7 +318,7 @@ void BrowserView::RegisterBrowserViewPrefs(PrefService* prefs) {
void BrowserView::Init() {
// Stow a pointer to this object onto the window handle so that we can get
// at it later when all we have is a HWND.
- SetProp(GetContainer()->GetHWND(), kBrowserWindowKey, this);
+ SetProp(GetWidget()->GetHWND(), kBrowserWindowKey, this);
// Start a hung plugin window detector for this browser object (as long as
// hang detection is not disabled).
@@ -342,7 +342,7 @@ void BrowserView::Init() {
set_contents_view(contents_container_);
AddChildView(contents_container_);
- status_bubble_.reset(new StatusBubble(GetContainer()));
+ status_bubble_.reset(new StatusBubble(GetWidget()));
#ifdef CHROME_PERSONALIZATION
EnablePersonalization(CommandLine().HasSwitch(switches::kEnableP13n));
@@ -405,7 +405,7 @@ void BrowserView::FlashFrame() {
}
void* BrowserView::GetNativeHandle() {
- return GetContainer()->GetHWND();
+ return GetWidget()->GetHWND();
}
TabStrip* BrowserView::GetTabStrip() const {
@@ -525,7 +525,7 @@ void BrowserView::ToggleBookmarkBar() {
void BrowserView::ShowAboutChromeDialog() {
views::Window::CreateChromeWindow(
- GetContainer()->GetHWND(), gfx::Rect(),
+ GetWidget()->GetHWND(), gfx::Rect(),
new AboutChromeView(browser_->profile()))->Show();
}
@@ -564,25 +564,25 @@ void BrowserView::ShowReportBugDialog() {
// Grab an exact snapshot of the window that the user is seeing (i.e. as
// rendered--do not re-render, and include windowed plugins)
std::vector<unsigned char> *screenshot_png = new std::vector<unsigned char>;
- win_util::GrabWindowSnapshot(GetContainer()->GetHWND(), screenshot_png);
+ win_util::GrabWindowSnapshot(GetWidget()->GetHWND(), screenshot_png);
// the BugReportView takes ownership of the png data, and will dispose of
// it in its destructor.
bug_report_view->set_png_data(screenshot_png);
// Create and show the dialog
- views::Window::CreateChromeWindow(GetContainer()->GetHWND(), gfx::Rect(),
+ views::Window::CreateChromeWindow(GetWidget()->GetHWND(), gfx::Rect(),
bug_report_view)->Show();
}
void BrowserView::ShowClearBrowsingDataDialog() {
views::Window::CreateChromeWindow(
- GetContainer()->GetHWND(), gfx::Rect(),
+ GetWidget()->GetHWND(), gfx::Rect(),
new ClearBrowsingDataView(browser_->profile()))->Show();
}
void BrowserView::ShowImportDialog() {
views::Window::CreateChromeWindow(
- GetContainer()->GetHWND(), gfx::Rect(),
+ GetWidget()->GetHWND(), gfx::Rect(),
new ImporterView(browser_->profile()))->Show();
}
@@ -597,7 +597,7 @@ void BrowserView::ShowPasswordManager() {
void BrowserView::ShowHTMLDialog(HtmlDialogContentsDelegate* delegate,
void* parent_window) {
HWND parent_hwnd = reinterpret_cast<HWND>(parent_window);
- parent_hwnd = parent_hwnd ? parent_hwnd : GetContainer()->GetHWND();
+ parent_hwnd = parent_hwnd ? parent_hwnd : GetWidget()->GetHWND();
HtmlDialogView* html_view = new HtmlDialogView(browser_.get(),
browser_->profile(),
delegate);
@@ -909,7 +909,7 @@ void BrowserView::Layout() {
void BrowserView::ViewHierarchyChanged(bool is_add,
views::View* parent,
views::View* child) {
- if (is_add && child == this && GetContainer() && !initialized_) {
+ if (is_add && child == this && GetWidget() && !initialized_) {
Init();
initialized_ = true;
}
@@ -1210,7 +1210,7 @@ void BrowserView::LoadAccelerators() {
CopyAcceleratorTable(accelerator_table, accelerators, count);
views::FocusManager* focus_manager =
- views::FocusManager::GetFocusManager(GetContainer()->GetHWND());
+ views::FocusManager::GetFocusManager(GetWidget()->GetHWND());
DCHECK(focus_manager);
// Let's build our own accelerator table.
@@ -1325,7 +1325,7 @@ void BrowserView::InitHangMonitor() {
int hung_plugin_detect_freq =
pref_service->GetInteger(prefs::kHungPluginDetectFrequency);
if ((hung_plugin_detect_freq > 0) &&
- hung_window_detector_.Initialize(GetContainer()->GetHWND(),
+ hung_window_detector_.Initialize(GetWidget()->GetHWND(),
plugin_message_response_timeout)) {
ticker_.set_tick_interval(hung_plugin_detect_freq);
ticker_.RegisterTickHandler(&hung_window_detector_);
diff --git a/chrome/browser/views/frame/opaque_frame.cc b/chrome/browser/views/frame/opaque_frame.cc
index f04d8e2..9a7f356 100644
--- a/chrome/browser/views/frame/opaque_frame.cc
+++ b/chrome/browser/views/frame/opaque_frame.cc
@@ -71,7 +71,7 @@ int OpaqueFrame::GetShowState() const {
}
///////////////////////////////////////////////////////////////////////////////
-// OpaqueFrame, views::ContainerWin overrides:
+// OpaqueFrame, views::WidgetWin overrides:
bool OpaqueFrame::AcceleratorPressed(views::Accelerator* accelerator) {
return browser_view_->AcceleratorPressed(*accelerator);
diff --git a/chrome/browser/views/frame/opaque_frame.h b/chrome/browser/views/frame/opaque_frame.h
index f28d782..13c20d2 100644
--- a/chrome/browser/views/frame/opaque_frame.h
+++ b/chrome/browser/views/frame/opaque_frame.h
@@ -44,7 +44,7 @@ class OpaqueFrame : public BrowserFrame,
virtual void UpdateWindowIcon();
virtual int GetShowState() const;
- // Overridden from views::ContainerWin:
+ // Overridden from views::WidgetWin:
virtual bool AcceleratorPressed(views::Accelerator* accelerator);
virtual bool GetAccelerator(int cmd_id, views::Accelerator* accelerator);
virtual void OnEndSession(BOOL ending, UINT logoff);
diff --git a/chrome/browser/views/frame/opaque_non_client_view.cc b/chrome/browser/views/frame/opaque_non_client_view.cc
index 1f30ae5..f7bfe22 100644
--- a/chrome/browser/views/frame/opaque_non_client_view.cc
+++ b/chrome/browser/views/frame/opaque_non_client_view.cc
@@ -667,7 +667,7 @@ void OpaqueNonClientView::ViewHierarchyChanged(bool is_add,
views::View* parent,
views::View* child) {
if (is_add && child == this) {
- DCHECK(GetContainer());
+ DCHECK(GetWidget());
DCHECK(frame_->client_view()->GetParent() != this);
AddChildView(frame_->client_view());
diff --git a/chrome/browser/views/hung_renderer_view.cc b/chrome/browser/views/hung_renderer_view.cc
index 92f68b7..5e5a411 100644
--- a/chrome/browser/views/hung_renderer_view.cc
+++ b/chrome/browser/views/hung_renderer_view.cc
@@ -314,7 +314,7 @@ void HungRendererWarningView::ButtonPressed(views::NativeButton* sender) {
void HungRendererWarningView::ViewHierarchyChanged(bool is_add,
views::View* parent,
views::View* child) {
- if (!initialized_ && is_add && child == this && GetContainer())
+ if (!initialized_ && is_add && child == this && GetWidget())
Init();
}
diff --git a/chrome/browser/views/hwnd_html_view.cc b/chrome/browser/views/hwnd_html_view.cc
index 1661624..41fc7c6 100644
--- a/chrome/browser/views/hwnd_html_view.cc
+++ b/chrome/browser/views/hwnd_html_view.cc
@@ -8,7 +8,7 @@
#include "chrome/browser/render_widget_host_view_win.h"
#include "chrome/browser/render_view_host_delegate.h"
#include "chrome/browser/site_instance.h"
-#include "chrome/views/container.h"
+#include "chrome/views/widget.h"
HWNDHtmlView::~HWNDHtmlView() {
if (render_view_host_) {
@@ -47,6 +47,6 @@ void HWNDHtmlView::Init(HWND parent_hwnd) {
void HWNDHtmlView::ViewHierarchyChanged(bool is_add, View* parent,
View* child) {
- if (is_add && GetContainer() && !initialized_)
- Init(GetContainer()->GetHWND());
+ if (is_add && GetWidget() && !initialized_)
+ Init(GetWidget()->GetHWND());
}
diff --git a/chrome/browser/views/info_bar_item_view.cc b/chrome/browser/views/info_bar_item_view.cc
index 78c4179..843f92e 100644
--- a/chrome/browser/views/info_bar_item_view.cc
+++ b/chrome/browser/views/info_bar_item_view.cc
@@ -7,10 +7,10 @@
#include "chrome/browser/views/standard_layout.h"
#include "chrome/common/l10n_util.h"
#include "chrome/common/resource_bundle.h"
-#include "chrome/views/container.h"
#include "chrome/views/external_focus_tracker.h"
#include "chrome/views/image_view.h"
#include "chrome/views/root_view.h"
+#include "chrome/views/widget.h"
#include "generated_resources.h"
@@ -203,7 +203,7 @@ void InfoBarItemView::ViewHierarchyChanged(bool is_add,
View* root_view = GetRootView();
HWND root_hwnd = NULL;
if (root_view)
- root_hwnd = root_view->GetContainer()->GetHWND();
+ root_hwnd = root_view->GetWidget()->GetHWND();
if (root_hwnd) {
focus_tracker_.reset(new views::ExternalFocusTracker(
diff --git a/chrome/browser/views/info_bubble.cc b/chrome/browser/views/info_bubble.cc
index 0fc2264..56e1e48 100644
--- a/chrome/browser/views/info_bubble.cc
+++ b/chrome/browser/views/info_bubble.cc
@@ -109,7 +109,7 @@ void InfoBubble::Init(HWND parent_hwnd,
(win_util::GetWinVersion() < win_util::WINVERSION_XP) ?
0 : CS_DROPSHADOW);
- ContainerWin::Init(parent_hwnd, bounds, true);
+ WidgetWin::Init(parent_hwnd, bounds, true);
SetContentsView(content_view_);
// The preferred size may differ when parented. Ask for the bounds again
// and if they differ reset the bounds.
@@ -145,7 +145,7 @@ void InfoBubble::Close() {
if (delegate_)
delegate_->InfoBubbleClosing(this);
parent_->DisableInactiveRendering(false);
- ContainerWin::Close();
+ WidgetWin::Close();
}
void InfoBubble::AnimationProgressed(const Animation* animation) {
diff --git a/chrome/browser/views/info_bubble.h b/chrome/browser/views/info_bubble.h
index cab1644..08a0667 100644
--- a/chrome/browser/views/info_bubble.h
+++ b/chrome/browser/views/info_bubble.h
@@ -6,8 +6,8 @@
#define CHROME_BROWSER_VIEWS_INFO_BUBBLE_H_
#include "chrome/common/slide_animation.h"
-#include "chrome/views/container_win.h"
#include "chrome/views/view.h"
+#include "chrome/views/widget_win.h"
// InfoBubble is used to display an arbitrary view above all other windows.
// Think of InfoBubble as a tooltip that allows you to embed an arbitrary view
@@ -33,7 +33,7 @@ class InfoBubbleDelegate {
virtual bool CloseOnEscape() = 0;
};
-class InfoBubble : public views::ContainerWin,
+class InfoBubble : public views::WidgetWin,
public AnimationDelegate {
public:
// Shows the InfoBubble. The InfoBubble is parented to parent_hwnd, contains
diff --git a/chrome/browser/views/keyword_editor_view.cc b/chrome/browser/views/keyword_editor_view.cc
index 1bd08a4..be35283 100644
--- a/chrome/browser/views/keyword_editor_view.cc
+++ b/chrome/browser/views/keyword_editor_view.cc
@@ -553,8 +553,7 @@ void KeywordEditorView::OnDoubleClick() {
void KeywordEditorView::ButtonPressed(views::NativeButton* sender) {
if (sender == add_button_) {
EditKeywordController* controller =
- new EditKeywordController(GetContainer()->GetHWND(), NULL, this,
- profile_);
+ new EditKeywordController(GetWidget()->GetHWND(), NULL, this, profile_);
controller->Show();
} else if (sender == remove_button_) {
DCHECK(table_view_->SelectedRowCount() > 0);
@@ -582,7 +581,7 @@ void KeywordEditorView::ButtonPressed(views::NativeButton* sender) {
const TemplateURL* template_url =
&table_model_->GetTemplateURL(selected_row);
EditKeywordController* controller =
- new EditKeywordController(GetContainer()->GetHWND(), template_url,
+ new EditKeywordController(GetWidget()->GetHWND(), template_url,
this, profile_);
controller->Show();
} else if (sender == make_default_button_) {
diff --git a/chrome/browser/views/location_bar_view.cc b/chrome/browser/views/location_bar_view.cc
index c28974f..c8a4ebc 100644
--- a/chrome/browser/views/location_bar_view.cc
+++ b/chrome/browser/views/location_bar_view.cc
@@ -26,8 +26,8 @@
#include "chrome/common/win_util.h"
#include "chrome/views/background.h"
#include "chrome/views/border.h"
-#include "chrome/views/container.h"
#include "chrome/views/root_view.h"
+#include "chrome/views/widget.h"
#include "generated_resources.h"
using views::View;
@@ -123,10 +123,9 @@ void LocationBarView::Init() {
}
// URL edit field.
- views::Container* vc = GetContainer();
- DCHECK(vc) << "LocationBarView::Init - vc is NULL!";
+ views::Widget* widget = GetWidget();
location_entry_.reset(new AutocompleteEditView(font_, this, model_, this,
- vc->GetHWND(),
+ widget->GetHWND(),
profile_, controller_,
popup_window_mode_));
@@ -826,7 +825,7 @@ void LocationBarView::ShowInfoBubbleTask::Run() {
if (cancelled_)
return;
- if (!image_view_->GetContainer()->IsActive()) {
+ if (!image_view_->GetWidget()->IsActive()) {
// The browser is no longer active. Let's not show the info bubble, this
// would make the browser the active window again. Also makes sure we NULL
// show_info_bubble_task_ to prevent the SecurityImageView from keeping a
@@ -847,7 +846,7 @@ void LocationBarView::ShowInfoBubbleTask::Cancel() {
void LocationBarView::ShowFirstRunBubbleInternal() {
if (!location_entry_view_)
return;
- if (!location_entry_view_->GetContainer()->IsActive()) {
+ if (!location_entry_view_->GetWidget()->IsActive()) {
// The browser is no longer active. Let's not show the info bubble, this
// would make the browser the active window again.
return;
@@ -872,7 +871,7 @@ void LocationBarView::ShowFirstRunBubbleInternal() {
bounds.set_x(location.x() - 20);
FirstRunBubble::Show(
- location_entry_view_->GetRootView()->GetContainer()->GetHWND(),
+ location_entry_view_->GetRootView()->GetWidget()->GetHWND(),
bounds);
}
@@ -945,7 +944,7 @@ void LocationBarView::SecurityImageView::ShowInfoBubble() {
label->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
label->SizeToFit(0);
DCHECK(info_bubble_ == NULL);
- info_bubble_ = InfoBubble::Show(GetRootView()->GetContainer()->GetHWND(),
+ info_bubble_ = InfoBubble::Show(GetRootView()->GetWidget()->GetHWND(),
bounds, label, this);
show_info_bubble_task_ = NULL;
}
@@ -989,7 +988,7 @@ bool LocationBarView::SecurityImageView::OnMousePressed(
}
PageInfoWindow::CreatePageInfo(profile_,
nav_entry,
- GetRootView()->GetContainer()->GetHWND(),
+ GetRootView()->GetWidget()->GetHWND(),
PageInfoWindow::SECURITY);
return true;
}
diff --git a/chrome/browser/views/options/advanced_contents_view.cc b/chrome/browser/views/options/advanced_contents_view.cc
index d50ce4e..c8f7d46 100644
--- a/chrome/browser/views/options/advanced_contents_view.cc
+++ b/chrome/browser/views/options/advanced_contents_view.cc
@@ -675,7 +675,7 @@ void WebContentSection::ButtonPressed(views::NativeButton* sender) {
disable_popup_blocked_notification_pref_.SetValue(!notification_disabled);
} else if (sender == gears_settings_button_) {
UserMetricsRecordAction(L"Options_GearsSettings", NULL);
- GearsSettingsPressed(GetAncestor(GetContainer()->GetHWND(), GA_ROOT));
+ GearsSettingsPressed(GetAncestor(GetWidget()->GetHWND(), GA_ROOT));
}
}
diff --git a/chrome/browser/views/options/content_page_view.cc b/chrome/browser/views/options/content_page_view.cc
index acad68d..e4e443d 100644
--- a/chrome/browser/views/options/content_page_view.cc
+++ b/chrome/browser/views/options/content_page_view.cc
@@ -25,11 +25,11 @@
#include "chrome/common/pref_service.h"
#include "chrome/common/resource_bundle.h"
#include "chrome/views/checkbox.h"
-#include "chrome/views/container.h"
#include "chrome/views/grid_layout.h"
#include "chrome/views/native_button.h"
#include "chrome/views/radio_button.h"
#include "chrome/views/text_field.h"
+#include "chrome/views/widget.h"
#include "generated_resources.h"
#include "skia/include/SkBitmap.h"
@@ -127,7 +127,7 @@ gfx::Size FileDisplayArea::GetPreferredSize() {
void FileDisplayArea::ViewHierarchyChanged(bool is_add,
views::View* parent,
views::View* child) {
- if (!initialized_ && is_add && GetContainer())
+ if (!initialized_ && is_add && GetWidget())
Init();
}
diff --git a/chrome/browser/views/options/fonts_page_view.cc b/chrome/browser/views/options/fonts_page_view.cc
index aa0b7be..b41fb55 100644
--- a/chrome/browser/views/options/fonts_page_view.cc
+++ b/chrome/browser/views/options/fonts_page_view.cc
@@ -26,11 +26,11 @@
#include "chrome/common/pref_service.h"
#include "chrome/common/resource_bundle.h"
#include "chrome/views/checkbox.h"
-#include "chrome/views/container.h"
#include "chrome/views/grid_layout.h"
#include "chrome/views/native_button.h"
#include "chrome/views/radio_button.h"
#include "chrome/views/text_field.h"
+#include "chrome/views/widget.h"
#include "generated_resources.h"
#include "skia/include/SkBitmap.h"
@@ -228,7 +228,7 @@ FontsPageView::~FontsPageView() {
}
void FontsPageView::ButtonPressed(views::NativeButton* sender) {
- HWND owning_hwnd = GetAncestor(GetContainer()->GetHWND(), GA_ROOT);
+ HWND owning_hwnd = GetAncestor(GetWidget()->GetHWND(), GA_ROOT);
std::wstring font_name;
int font_size = 0;
if (sender == serif_font_change_page_button_) {
diff --git a/chrome/browser/views/options/languages_page_view.cc b/chrome/browser/views/options/languages_page_view.cc
index 84e35f8..78d5235 100644
--- a/chrome/browser/views/options/languages_page_view.cc
+++ b/chrome/browser/views/options/languages_page_view.cc
@@ -28,12 +28,12 @@
#include "chrome/common/resource_bundle.h"
#include "chrome/views/checkbox.h"
#include "chrome/views/combo_box.h"
-#include "chrome/views/container.h"
#include "chrome/views/grid_layout.h"
#include "chrome/views/native_button.h"
#include "chrome/views/radio_button.h"
#include "chrome/views/tabbed_pane.h"
#include "chrome/views/text_field.h"
+#include "chrome/views/widget.h"
#include "skia/include/SkBitmap.h"
#include "unicode/uloc.h"
@@ -318,7 +318,7 @@ gfx::Size AddLanguageWindowView::GetPreferredSize() {
void AddLanguageWindowView::ViewHierarchyChanged(bool is_add,
views::View* parent,
views::View* child) {
- // Can't init before we're inserted into a Container, because we require
+ // Can't init before we're inserted into a Widget, because we require
// a HWND to parent native child controls to.
if (is_add && child == this)
Init();
@@ -523,7 +523,7 @@ void LanguagesPageView::ButtonPressed(views::NativeButton* sender) {
language_table_edited_ = true;
} else if (sender == add_button_) {
views::Window::CreateChromeWindow(
- GetContainer()->GetHWND(),
+ GetWidget()->GetHWND(),
gfx::Rect(),
new AddLanguageWindowView(this, profile()))->Show();
language_table_edited_ = true;
diff --git a/chrome/browser/views/options/options_page_view.cc b/chrome/browser/views/options/options_page_view.cc
index bf16a17..8fa28a4 100644
--- a/chrome/browser/views/options/options_page_view.cc
+++ b/chrome/browser/views/options/options_page_view.cc
@@ -7,7 +7,7 @@
#include "chrome/browser/browser_process.h"
#include "chrome/browser/user_metrics.h"
#include "chrome/common/pref_service.h"
-#include "chrome/views/container.h"
+#include "chrome/views/widget.h"
///////////////////////////////////////////////////////////////////////////////
// OptionsPageView
@@ -43,7 +43,7 @@ void OptionsPageView::Observe(NotificationType type,
void OptionsPageView::ViewHierarchyChanged(bool is_add,
views::View* parent,
views::View* child) {
- if (!initialized_ && is_add && GetContainer()) {
+ if (!initialized_ && is_add && GetWidget()) {
// It is important that this only get done _once_ otherwise we end up
// duplicating the view hierarchy when tabs are switched.
initialized_ = true;
@@ -53,7 +53,7 @@ void OptionsPageView::ViewHierarchyChanged(bool is_add,
}
HWND OptionsPageView::GetRootWindow() const {
- // Our Container is the TabbedPane content HWND, which is a child HWND.
+ // Our Widget is the TabbedPane content HWND, which is a child HWND.
// We need the root HWND for parenting.
- return GetAncestor(GetContainer()->GetHWND(), GA_ROOT);
+ return GetAncestor(GetWidget()->GetHWND(), GA_ROOT);
}
diff --git a/chrome/browser/views/shelf_item_dialog.cc b/chrome/browser/views/shelf_item_dialog.cc
index f32ce79..fed7d5c 100644
--- a/chrome/browser/views/shelf_item_dialog.cc
+++ b/chrome/browser/views/shelf_item_dialog.cc
@@ -455,7 +455,7 @@ bool ShelfItemDialog::AcceleratorPressed(
window()->Close();
} else if (accelerator.GetKeyCode() == VK_RETURN) {
views::FocusManager* fm = views::FocusManager::GetFocusManager(
- GetContainer()->GetHWND());
+ GetWidget()->GetHWND());
if (fm->GetFocusedView() == url_table_) {
// Return on table behaves like a double click.
OnDoubleClick();
diff --git a/chrome/browser/views/status_bubble.cc b/chrome/browser/views/status_bubble.cc
index 526e9b3..db19e0c 100644
--- a/chrome/browser/views/status_bubble.cc
+++ b/chrome/browser/views/status_bubble.cc
@@ -16,7 +16,7 @@
#include "chrome/common/resource_bundle.h"
#include "chrome/views/label.h"
#include "chrome/views/root_view.h"
-#include "chrome/views/container_win.h"
+#include "chrome/views/widget_win.h"
#include "googleurl/src/gurl.h"
#include "net/base/net_util.h"
#include "SkPaint.h"
@@ -68,7 +68,7 @@ class StatusBubble::StatusView : public views::Label,
public Animation,
public AnimationDelegate {
public:
- StatusView(StatusBubble* status_bubble, views::ContainerWin* popup)
+ StatusView(StatusBubble* status_bubble, views::WidgetWin* popup)
: Animation(kFramerate, this),
status_bubble_(status_bubble),
popup_(popup),
@@ -152,7 +152,7 @@ class StatusBubble::StatusView : public views::Label,
StatusBubble* status_bubble_;
// Handle to the HWND that contains us.
- views::ContainerWin* popup_;
+ views::WidgetWin* popup_;
// The currently-displayed text.
std::wstring text_;
@@ -443,7 +443,7 @@ void StatusBubble::StatusView::Paint(ChromeCanvas* canvas) {
// StatusBubble ---------------------------------------------------------------
-StatusBubble::StatusBubble(views::Container* frame)
+StatusBubble::StatusBubble(views::Widget* frame)
: popup_(NULL),
frame_(frame),
view_(NULL),
@@ -465,7 +465,7 @@ StatusBubble::~StatusBubble() {
void StatusBubble::Init() {
if (!popup_) {
- popup_ = new views::ContainerWin();
+ popup_ = new views::WidgetWin();
popup_->set_delete_on_destroy(false);
if (!view_) {
diff --git a/chrome/browser/views/status_bubble.h b/chrome/browser/views/status_bubble.h
index 981eda7..834feccc 100644
--- a/chrome/browser/views/status_bubble.h
+++ b/chrome/browser/views/status_bubble.h
@@ -6,8 +6,8 @@
#define CHROME_BROWSER_VIEWS_STATUS_BUBBLE_H__
#include "base/gfx/rect.h"
-#include "chrome/views/container.h"
-#include "chrome/views/container_win.h"
+#include "chrome/views/widget.h"
+#include "chrome/views/widget_win.h"
class GURL;
@@ -16,7 +16,7 @@ class GURL;
// to allow users to see where hovered links point to.
class StatusBubble {
public:
- explicit StatusBubble(views::Container* frame);
+ explicit StatusBubble(views::Widget* frame);
~StatusBubble();
// Sets the bubble contents to a specific string and causes the bubble
@@ -74,10 +74,10 @@ class StatusBubble {
// We use a HWND for the popup so that it may float above any HWNDs in our
// UI (the location bar, for example).
- views::ContainerWin* popup_;
+ views::WidgetWin* popup_;
double opacity_;
- views::Container* frame_;
+ views::Widget* frame_;
StatusView* view_;
DISALLOW_EVIL_CONSTRUCTORS(StatusBubble);
diff --git a/chrome/browser/views/tab_contents_container_view.cc b/chrome/browser/views/tab_contents_container_view.cc
index c0c013b6..27e664e 100644
--- a/chrome/browser/views/tab_contents_container_view.cc
+++ b/chrome/browser/views/tab_contents_container_view.cc
@@ -13,8 +13,8 @@
#include "chrome/browser/tab_contents.h"
#include "chrome/browser/view_ids.h"
#include "chrome/browser/web_contents.h"
-#include "chrome/views/container.h"
#include "chrome/views/root_view.h"
+#include "chrome/views/widget.h"
using views::FocusTraversable;
using views::FocusManager;
@@ -235,7 +235,7 @@ void TabContentsContainerView::RenderViewHostChanged(RenderViewHost* old_host,
// If we are focused, we need to pass the focus to the new RenderViewHost.
FocusManager* focus_manager =
- FocusManager::GetFocusManager(GetRootView()->GetContainer()->GetHWND());
+ FocusManager::GetFocusManager(GetRootView()->GetWidget()->GetHWND());
if (focus_manager->GetFocusedView() == this)
Focus();
}
diff --git a/chrome/browser/views/tabs/dragged_tab_controller.cc b/chrome/browser/views/tabs/dragged_tab_controller.cc
index c88920a..b0a162d 100644
--- a/chrome/browser/views/tabs/dragged_tab_controller.cc
+++ b/chrome/browser/views/tabs/dragged_tab_controller.cc
@@ -208,7 +208,7 @@ class DraggedTabController::DockDisplayer : public AnimationDelegate {
break;
}
- popup_ = new views::ContainerWin;
+ popup_ = new views::WidgetWin;
popup_->set_window_style(WS_POPUP);
popup_->set_window_ex_style(WS_EX_LAYERED | WS_EX_TOOLWINDOW |
WS_EX_TOPMOST);
@@ -282,7 +282,7 @@ class DraggedTabController::DockDisplayer : public AnimationDelegate {
DraggedTabController* controller_;
// Window we're showing.
- views::ContainerWin* popup_;
+ views::WidgetWin* popup_;
// HWND of |popup_|. We cache this to avoid the possibility of invoking a
// method on popup_ after we close it.
@@ -502,7 +502,7 @@ void DraggedTabController::DidProcessMessage(const MSG& msg) {
void DraggedTabController::InitWindowCreatePoint() {
window_create_point_.SetPoint(mouse_offset_.x(), mouse_offset_.y());
Tab* first_tab = attached_tabstrip_->GetTabAt(0);
- views::View::ConvertPointToContainer(first_tab, &window_create_point_);
+ views::View::ConvertPointToWidget(first_tab, &window_create_point_);
}
gfx::Point DraggedTabController::GetWindowCreatePoint() const {
@@ -664,7 +664,7 @@ DockInfo DraggedTabController::GetDockInfoAtPoint(
return dock_info_;
}
- HWND dragged_hwnd = view_->GetContainer()->GetHWND();
+ HWND dragged_hwnd = view_->GetWidget()->GetHWND();
dock_windows_.insert(dragged_hwnd);
DockInfo info = DockInfo::GetDockInfoAtPoint(screen_point, dock_windows_);
dock_windows_.erase(dragged_hwnd);
@@ -673,7 +673,7 @@ DockInfo DraggedTabController::GetDockInfoAtPoint(
TabStrip* DraggedTabController::GetTabStripForPoint(
const gfx::Point& screen_point) {
- HWND dragged_hwnd = view_->GetContainer()->GetHWND();
+ HWND dragged_hwnd = view_->GetWidget()->GetHWND();
dock_windows_.insert(dragged_hwnd);
HWND local_window =
DockInfo::GetLocalProcessWindowAtPoint(screen_point, dock_windows_);
@@ -776,7 +776,7 @@ void DraggedTabController::Attach(TabStrip* attached_tabstrip,
tab->SetVisible(false);
// Move the corresponding window to the front.
- attached_tabstrip_->GetContainer()->MoveToFront(true);
+ attached_tabstrip_->GetWidget()->MoveToFront(true);
}
void DraggedTabController::Detach() {
@@ -984,7 +984,7 @@ void DraggedTabController::RevertDrag() {
// it has been hidden.
if (restore_frame) {
if (!restore_bounds_.IsEmpty()) {
- HWND frame_hwnd = source_tabstrip_->GetContainer()->GetHWND();
+ HWND frame_hwnd = source_tabstrip_->GetWidget()->GetHWND();
MoveWindow(frame_hwnd, restore_bounds_.x(), restore_bounds_.y(),
restore_bounds_.width(), restore_bounds_.height(), TRUE);
}
@@ -1052,7 +1052,7 @@ bool DraggedTabController::CompleteDrag() {
}
// Compel the model to construct a new window for the detached TabContents.
CRect browser_rect;
- GetWindowRect(source_tabstrip_->GetContainer()->GetHWND(), &browser_rect);
+ GetWindowRect(source_tabstrip_->GetWidget()->GetHWND(), &browser_rect);
gfx::Rect window_bounds(
GetWindowCreatePoint(),
gfx::Size(browser_rect.Width(), browser_rect.Height()));
@@ -1101,7 +1101,7 @@ int DraggedTabController::NormalizeIndexToAttachedTabStrip(int index) const {
void DraggedTabController::HideFrame() {
// We don't actually hide the window, rather we just move it way off-screen.
// If we actually hide it, we stop receiving drag events.
- HWND frame_hwnd = source_tabstrip_->GetContainer()->GetHWND();
+ HWND frame_hwnd = source_tabstrip_->GetWidget()->GetHWND();
RECT wr;
GetWindowRect(frame_hwnd, &wr);
MoveWindow(frame_hwnd, 0xFFFF, 0xFFFF, wr.right - wr.left,
diff --git a/chrome/browser/views/tabs/dragged_tab_view.cc b/chrome/browser/views/tabs/dragged_tab_view.cc
index 6f20c6a..9aaeee1 100644
--- a/chrome/browser/views/tabs/dragged_tab_view.cc
+++ b/chrome/browser/views/tabs/dragged_tab_view.cc
@@ -9,7 +9,7 @@
#include "chrome/browser/tabs/tab_strip_model.h"
#include "chrome/browser/views/tabs/hwnd_photobooth.h"
#include "chrome/browser/views/tabs/tab_renderer.h"
-#include "chrome/views/container_win.h"
+#include "chrome/views/widget_win.h"
#include "skia/include/SkShader.h"
const int kTransparentAlpha = 200;
@@ -38,7 +38,7 @@ DraggedTabView::DraggedTabView(TabContents* datasource,
renderer_->UpdateData(datasource);
- container_.reset(new views::ContainerWin);
+ container_.reset(new views::WidgetWin);
container_->set_delete_on_destroy(false);
container_->set_window_style(WS_POPUP);
container_->set_window_ex_style(
@@ -107,7 +107,7 @@ void DraggedTabView::AnimateToBounds(const gfx::Rect& bounds,
animation_callback_.reset(callback);
RECT wr;
- GetWindowRect(GetContainer()->GetHWND(), &wr);
+ GetWindowRect(GetWidget()->GetHWND(), &wr);
animation_start_bounds_ = wr;
animation_end_bounds_ = bounds;
diff --git a/chrome/browser/views/tabs/dragged_tab_view.h b/chrome/browser/views/tabs/dragged_tab_view.h
index be809f4..e219a5d 100644
--- a/chrome/browser/views/tabs/dragged_tab_view.h
+++ b/chrome/browser/views/tabs/dragged_tab_view.h
@@ -13,7 +13,7 @@
#include "skia/include/SkBitmap.h"
namespace views {
-class ContainerWin;
+class WidgetWin;
}
namespace gfx {
class Point;
@@ -76,7 +76,7 @@ class DraggedTabView : public views::View,
int ScaleValue(int value);
// The window that contains the DraggedTabView.
- scoped_ptr<views::ContainerWin> container_;
+ scoped_ptr<views::WidgetWin> container_;
// The renderer that paints the Tab shape.
scoped_ptr<TabRenderer> renderer_;
diff --git a/chrome/browser/views/tabs/hwnd_photobooth.cc b/chrome/browser/views/tabs/hwnd_photobooth.cc
index 052c4aa..19e130c 100644
--- a/chrome/browser/views/tabs/hwnd_photobooth.cc
+++ b/chrome/browser/views/tabs/hwnd_photobooth.cc
@@ -6,7 +6,7 @@
#include "chrome/browser/tab_contents.h"
#include "chrome/browser/views/tabs/hwnd_photobooth.h"
#include "chrome/common/gfx/chrome_canvas.h"
-#include "chrome/views/container_win.h"
+#include "chrome/views/widget_win.h"
#include "skia/include/SkBitmap.h"
namespace {
@@ -143,7 +143,7 @@ void HWNDPhotobooth::CreateCaptureWindow(HWND initial_hwnd) {
gfx::Point window_position = GetCaptureWindowPosition();
gfx::Rect capture_bounds(window_position.x(), window_position.y(),
contents_rect.Width(), contents_rect.Height());
- capture_window_ = new views::ContainerWin;
+ capture_window_ = new views::WidgetWin;
capture_window_->set_window_style(WS_POPUP);
// WS_EX_TOOLWINDOW ensures the capture window doesn't produce a Taskbar
// button.
diff --git a/chrome/browser/views/tabs/hwnd_photobooth.h b/chrome/browser/views/tabs/hwnd_photobooth.h
index e3fb423..56a5eb2 100644
--- a/chrome/browser/views/tabs/hwnd_photobooth.h
+++ b/chrome/browser/views/tabs/hwnd_photobooth.h
@@ -10,7 +10,7 @@
class ChromeCanvas;
namespace views {
-class ContainerWin;
+class WidgetWin;
}
///////////////////////////////////////////////////////////////////////////////
@@ -50,7 +50,7 @@ class HWNDPhotobooth {
void CreateCaptureWindow(HWND initial_hwnd);
// The nearly off-screen photo-booth layered window used to hold the HWND.
- views::ContainerWin* capture_window_;
+ views::WidgetWin* capture_window_;
// The current HWND being captured.
HWND current_hwnd_;
diff --git a/chrome/browser/views/tabs/tab.cc b/chrome/browser/views/tabs/tab.cc
index e170b76..d4b28ac 100644
--- a/chrome/browser/views/tabs/tab.cc
+++ b/chrome/browser/views/tabs/tab.cc
@@ -10,8 +10,8 @@
#include "chrome/common/l10n_util.h"
#include "chrome/common/resource_bundle.h"
#include "chrome/views/chrome_menu.h"
-#include "chrome/views/container.h"
#include "chrome/views/tooltip_manager.h"
+#include "chrome/views/widget.h"
#include "generated_resources.h"
const std::string Tab::kTabClassName = "browser/tabs/Tab";
@@ -53,7 +53,7 @@ class TabContextMenuController : public views::MenuDelegate {
}
void RunMenuAt(int x, int y) {
- menu_->RunMenuAt(tab_->GetContainer()->GetHWND(), gfx::Rect(x, y, 0, 0),
+ menu_->RunMenuAt(tab_->GetWidget()->GetHWND(), gfx::Rect(x, y, 0, 0),
views::MenuItemView::TOPLEFT, true);
}
diff --git a/chrome/browser/views/tabs/tab_strip.cc b/chrome/browser/views/tabs/tab_strip.cc
index 0f7a743..eb344c0 100644
--- a/chrome/browser/views/tabs/tab_strip.cc
+++ b/chrome/browser/views/tabs/tab_strip.cc
@@ -354,15 +354,15 @@ class RemoveTabAnimation : public TabStrip::TabAnimation {
POINT pt;
GetCursorPos(&pt);
- views::Container* vc = tabstrip_->GetContainer();
+ views::Widget* widget = tabstrip_->GetWidget();
RECT wr;
- GetWindowRect(vc->GetHWND(), &wr);
+ GetWindowRect(widget->GetHWND(), &wr);
pt.x -= wr.left;
pt.y -= wr.top;
// Return to message loop - otherwise we may disrupt some operation that's
// in progress.
- PostMessage(vc->GetHWND(), WM_MOUSEMOVE, 0, MAKELPARAM(pt.x, pt.y));
+ PostMessage(widget->GetHWND(), WM_MOUSEMOVE, 0, MAKELPARAM(pt.x, pt.y));
}
int index_;
@@ -845,7 +845,7 @@ void TabStrip::TabInsertedAt(TabContents* contents,
// Don't animate the first tab, it looks weird, and don't animate anything
// if the containing window isn't visible yet.
- if (GetTabCount() > 1 && IsWindowVisible(GetContainer()->GetHWND())) {
+ if (GetTabCount() > 1 && IsWindowVisible(GetWidget()->GetHWND())) {
StartInsertTabAnimation(index);
} else {
Layout();
@@ -1369,7 +1369,7 @@ TabStrip::DropInfo::DropInfo(int drop_index, bool drop_before, bool point_down)
: drop_index(drop_index),
drop_before(drop_before),
point_down(point_down) {
- arrow_window = new views::ContainerWin;
+ arrow_window = new views::WidgetWin;
arrow_window->set_window_style(WS_POPUP);
arrow_window->set_window_ex_style(WS_EX_TOPMOST | WS_EX_NOACTIVATE |
WS_EX_LAYERED | WS_EX_TRANSPARENT);
diff --git a/chrome/browser/views/tabs/tab_strip.h b/chrome/browser/views/tabs/tab_strip.h
index 360ab41..e3389ab 100644
--- a/chrome/browser/views/tabs/tab_strip.h
+++ b/chrome/browser/views/tabs/tab_strip.h
@@ -9,9 +9,9 @@
#include "chrome/browser/tabs/tab_strip_model.h"
#include "chrome/browser/views/tabs/tab.h"
#include "chrome/views/button.h"
-#include "chrome/views/container_win.h"
#include "chrome/views/menu.h"
#include "chrome/views/view.h"
+#include "chrome/views/widget_win.h"
class DraggedTabController;
class ScopedMouseCloseWidthCalculator;
@@ -332,7 +332,7 @@ class TabStrip : public views::View,
bool point_down;
// Renders the drop indicator.
- views::ContainerWin* arrow_window;
+ views::WidgetWin* arrow_window;
views::ImageView* arrow_view;
private:
diff --git a/chrome/browser/views/toolbar_view.cc b/chrome/browser/views/toolbar_view.cc
index 1b56e84..ad3d8d0 100644
--- a/chrome/browser/views/toolbar_view.cc
+++ b/chrome/browser/views/toolbar_view.cc
@@ -34,12 +34,12 @@
#include "chrome/common/pref_names.h"
#include "chrome/common/pref_service.h"
#include "chrome/common/resource_bundle.h"
-#include "chrome/views/container.h"
+#include "chrome/views/background.h"
#include "chrome/views/button_dropdown.h"
#include "chrome/views/hwnd_view.h"
-#include "chrome/views/background.h"
#include "chrome/views/label.h"
#include "chrome/views/tooltip_manager.h"
+#include "chrome/views/widget.h"
#include "net/base/net_util.h"
#include "chromium_strings.h"
@@ -341,16 +341,14 @@ void BrowserToolbarView::DidGainFocus() {
acc_focused_view_->SetHotTracked(true);
// Show the tooltip for the view that got the focus.
- if (GetContainer()->GetTooltipManager()) {
- GetContainer()->GetTooltipManager()->
- ShowKeyboardTooltip(acc_focused_view_);
- }
+ if (GetWidget()->GetTooltipManager())
+ GetWidget()->GetTooltipManager()->ShowKeyboardTooltip(acc_focused_view_);
// Update focused_view with MSAA-adjusted child id.
view_index = acc_focused_view_->GetID();
}
- HWND hwnd = GetContainer()->GetHWND();
+ HWND hwnd = GetWidget()->GetHWND();
// Notify Access Technology that there was a change in keyboard focus.
::NotifyWinEvent(EVENT_OBJECT_FOCUS, hwnd, OBJID_CLIENT,
@@ -361,8 +359,8 @@ void BrowserToolbarView::WillLoseFocus() {
// Resetting focus state.
acc_focused_view_->SetHotTracked(false);
// Any tooltips that are active should be hidden when toolbar loses focus.
- if (GetContainer() && GetContainer()->GetTooltipManager())
- GetContainer()->GetTooltipManager()->HideKeyboardTooltip();
+ if (GetWidget() && GetWidget()->GetTooltipManager())
+ GetWidget()->GetTooltipManager()->HideKeyboardTooltip();
acc_focused_view_ = NULL;
}
@@ -388,8 +386,8 @@ bool BrowserToolbarView::OnKeyPressed(const views::KeyEvent& e) {
acc_focused_view_->GetID() == VIEW_ID_APP_MENU) {
// If a menu button in toolbar is activated and its menu is displayed,
// then active tooltip should be hidden.
- if (GetContainer()->GetTooltipManager())
- GetContainer()->GetTooltipManager()->HideKeyboardTooltip();
+ if (GetWidget()->GetTooltipManager())
+ GetWidget()->GetTooltipManager()->HideKeyboardTooltip();
// Safe to cast, given to above view id check.
static_cast<views::MenuButton*>(acc_focused_view_)->Activate();
if (!acc_focused_view_) {
@@ -422,11 +420,11 @@ bool BrowserToolbarView::OnKeyPressed(const views::KeyEvent& e) {
// Retrieve information to generate an MSAA focus event.
int view_id = acc_focused_view_->GetID();
- HWND hwnd = GetContainer()->GetHWND();
+ HWND hwnd = GetWidget()->GetHWND();
// Show the tooltip for the view that got the focus.
- if (GetContainer()->GetTooltipManager()) {
- GetContainer()->GetTooltipManager()->
+ if (GetWidget()->GetTooltipManager()) {
+ GetWidget()->GetTooltipManager()->
ShowKeyboardTooltip(GetChildViewAt(next_view));
}
// Notify Access Technology that there was a change in keyboard focus.
@@ -717,6 +715,6 @@ bool BrowserToolbarView::GetAcceleratorInfo(int id,
return true;
}
// Else, we retrieve the accelerator information from the frame.
- return GetContainer()->GetAccelerator(id, accel);
+ return GetWidget()->GetAccelerator(id, accel);
}
diff --git a/chrome/browser/views/user_data_dir_dialog.cc b/chrome/browser/views/user_data_dir_dialog.cc
index 85e512d..ec0c535 100644
--- a/chrome/browser/views/user_data_dir_dialog.cc
+++ b/chrome/browser/views/user_data_dir_dialog.cc
@@ -70,7 +70,7 @@ bool UserDataDirDialog::Accept() {
std::wstring dialog_title = l10n_util::GetString(
IDS_CANT_WRITE_USER_DIRECTORY_CHOOSE_DIRECTORY_BUTTON);
HWND owning_hwnd =
- GetAncestor(message_box_view_->GetContainer()->GetHWND(), GA_ROOT);
+ GetAncestor(message_box_view_->GetWidget()->GetHWND(), GA_ROOT);
select_file_dialog_->SelectFile(SelectFileDialog::SELECT_FOLDER,
dialog_title, std::wstring(), std::wstring(),
std::wstring(), owning_hwnd, NULL);
diff --git a/chrome/browser/web_contents_view_win.cc b/chrome/browser/web_contents_view_win.cc
index 4a15e62..a3a9cdc 100644
--- a/chrome/browser/web_contents_view_win.cc
+++ b/chrome/browser/web_contents_view_win.cc
@@ -58,7 +58,7 @@ void WebContentsViewWin::CreateView() {
// Since we create these windows parented to the desktop window initially, we
// don't want to create them initially visible.
set_window_style(WS_CHILD | WS_CLIPCHILDREN | WS_CLIPSIBLINGS);
- ContainerWin::Init(GetDesktopWindow(), gfx::Rect(), false);
+ WidgetWin::Init(GetDesktopWindow(), gfx::Rect(), false);
// Remove the root view drop target so we can register our own.
RevokeDragDrop(GetHWND());
@@ -583,7 +583,7 @@ void WebContentsViewWin::OnWindowPosChanged(WINDOWPOS* window_pos) {
}
void WebContentsViewWin::OnSize(UINT param, const CSize& size) {
- ContainerWin::OnSize(param, size);
+ WidgetWin::OnSize(param, size);
// Hack for thinkpad touchpad driver.
// Set fake scrollbars so that we can get scroll messages,
diff --git a/chrome/browser/web_contents_view_win.h b/chrome/browser/web_contents_view_win.h
index fa249c0..4b9d1fb 100644
--- a/chrome/browser/web_contents_view_win.h
+++ b/chrome/browser/web_contents_view_win.h
@@ -8,7 +8,7 @@
#include "base/gfx/size.h"
#include "base/scoped_ptr.h"
#include "chrome/browser/web_contents_view.h"
-#include "chrome/views/container_win.h"
+#include "chrome/views/widget_win.h"
class FindBarWin;
class InfoBarView;
@@ -20,7 +20,7 @@ class WebDropTarget;
// Windows-specific implementation of the WebContentsView. It is a HWND that
// contains all of the contents of the tab and associated child views.
class WebContentsViewWin : public WebContentsView,
- public views::ContainerWin {
+ public views::WidgetWin {
public:
// The corresponding WebContents is passed in the constructor, and manages our
// lifetime. This doesn't need to be the case, but is this way currently
@@ -78,7 +78,7 @@ class WebContentsViewWin : public WebContentsView,
private:
// Windows events ------------------------------------------------------------
- // Overrides from ContainerWin.
+ // Overrides from WidgetWin.
virtual void OnDestroy();
virtual void OnHScroll(int scroll_type, short position, HWND scrollbar);
virtual void OnMouseLeave();