summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/views')
-rw-r--r--chrome/browser/views/dropdown_bar_host.cc2
-rw-r--r--chrome/browser/views/dropdown_bar_host.h3
-rw-r--r--chrome/browser/views/dropdown_bar_host_gtk.cc5
-rw-r--r--chrome/browser/views/dropdown_bar_host_win.cc4
-rw-r--r--chrome/browser/views/info_bubble.cc4
-rw-r--r--chrome/browser/views/tabs/tab_strip.cc5
6 files changed, 3 insertions, 20 deletions
diff --git a/chrome/browser/views/dropdown_bar_host.cc b/chrome/browser/views/dropdown_bar_host.cc
index b722979..4878e15 100644
--- a/chrome/browser/views/dropdown_bar_host.cc
+++ b/chrome/browser/views/dropdown_bar_host.cc
@@ -44,7 +44,7 @@ void DropdownBarHost::Init(DropdownBarView* view) {
// Initialize the host.
host_.reset(CreateHost());
- host_->Init(GetNativeView(browser_view_), gfx::Rect());
+ host_->InitWithWidget(browser_view_->GetWidget(), gfx::Rect());
host_->SetContentsView(view_);
// Start listening to focus changes, so we can register and unregister our
diff --git a/chrome/browser/views/dropdown_bar_host.h b/chrome/browser/views/dropdown_bar_host.h
index e77ffa5..8b45f06 100644
--- a/chrome/browser/views/dropdown_bar_host.h
+++ b/chrome/browser/views/dropdown_bar_host.h
@@ -141,9 +141,6 @@ class DropdownBarHost : public views::AcceleratorTarget,
// Allows implementation to tweak widget position.
void SetWidgetPositionNative(const gfx::Rect& new_pos, bool no_redraw);
- // Returns the native view (is a child of the window widget in gtk).
- gfx::NativeView GetNativeView(BrowserView* browser_view);
-
// Returns a keyboard event suitable for fowarding.
NativeWebKeyboardEvent GetKeyboardEvent(
const TabContents* contents,
diff --git a/chrome/browser/views/dropdown_bar_host_gtk.cc b/chrome/browser/views/dropdown_bar_host_gtk.cc
index 751d0d8..2a4e4be 100644
--- a/chrome/browser/views/dropdown_bar_host_gtk.cc
+++ b/chrome/browser/views/dropdown_bar_host_gtk.cc
@@ -24,11 +24,6 @@ void DropdownBarHost::SetWidgetPositionNative(const gfx::Rect& new_pos,
host_->Show();
}
-gfx::NativeView DropdownBarHost::GetNativeView(BrowserView* browser_view) {
- return static_cast<views::WidgetGtk*>(
- browser_view->GetWidget())->window_contents();
-}
-
NativeWebKeyboardEvent DropdownBarHost::GetKeyboardEvent(
const TabContents* contents,
const views::Textfield::Keystroke& key_stroke) {
diff --git a/chrome/browser/views/dropdown_bar_host_win.cc b/chrome/browser/views/dropdown_bar_host_win.cc
index e5335dd..c14fb21 100644
--- a/chrome/browser/views/dropdown_bar_host_win.cc
+++ b/chrome/browser/views/dropdown_bar_host_win.cc
@@ -46,7 +46,3 @@ void DropdownBarHost::SetWidgetPositionNative(const gfx::Rect& new_pos,
::SetWindowPos(host_->GetNativeView(), HWND_TOP, new_pos.x(), new_pos.y(),
new_pos.width(), new_pos.height(), swp_flags);
}
-
-gfx::NativeView DropdownBarHost::GetNativeView(BrowserView* browser_view) {
- return browser_view->GetWidget()->GetNativeView();
-}
diff --git a/chrome/browser/views/info_bubble.cc b/chrome/browser/views/info_bubble.cc
index 230fcb6..41907af 100644
--- a/chrome/browser/views/info_bubble.cc
+++ b/chrome/browser/views/info_bubble.cc
@@ -338,9 +338,7 @@ void InfoBubble::Init(views::Widget* parent,
#elif defined(OS_LINUX)
MakeTransparent();
make_transient_to_parent();
- WidgetGtk::Init(
- GTK_WIDGET(static_cast<WidgetGtk*>(parent)->GetNativeView()),
- gfx::Rect());
+ WidgetGtk::InitWithWidget(parent, gfx::Rect());
#if defined(OS_CHROMEOS)
chromeos::WmIpc::instance()->SetWindowType(
GetNativeView(),
diff --git a/chrome/browser/views/tabs/tab_strip.cc b/chrome/browser/views/tabs/tab_strip.cc
index 857122a..77fb8eb 100644
--- a/chrome/browser/views/tabs/tab_strip.cc
+++ b/chrome/browser/views/tabs/tab_strip.cc
@@ -1010,16 +1010,13 @@ TabStrip::DropInfo::DropInfo(int drop_index, bool drop_before, bool point_down)
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);
- arrow_window->Init(
- NULL,
- gfx::Rect(0, 0, drop_indicator_width, drop_indicator_height));
#else
arrow_window = new views::WidgetGtk(views::WidgetGtk::TYPE_POPUP);
arrow_window->MakeTransparent();
+#endif
arrow_window->Init(
NULL,
gfx::Rect(0, 0, drop_indicator_width, drop_indicator_height));
-#endif
arrow_window->SetContentsView(arrow_view);
}