summaryrefslogtreecommitdiffstats
path: root/chrome/views/native_scroll_bar.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/views/native_scroll_bar.cc')
-rw-r--r--chrome/views/native_scroll_bar.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/chrome/views/native_scroll_bar.cc b/chrome/views/native_scroll_bar.cc
index fb10520..38f4b8d 100644
--- a/chrome/views/native_scroll_bar.cc
+++ b/chrome/views/native_scroll_bar.cc
@@ -11,8 +11,8 @@
#include <atlframe.h>
#include "base/message_loop.h"
-#include "chrome/views/container.h"
#include "chrome/views/hwnd_view.h"
+#include "chrome/views/widget.h"
namespace views {
@@ -30,7 +30,7 @@ class ScrollBarContainer : public CWindowImpl<ScrollBarContainer,
public:
ScrollBarContainer(ScrollBar* parent) : parent_(parent),
scrollbar_(NULL) {
- Create(parent->GetContainer()->GetHWND());
+ Create(parent->GetWidget()->GetHWND());
::ShowWindow(m_hWnd, SW_SHOW);
}
@@ -126,8 +126,8 @@ class ScrollBarContainer : public CWindowImpl<ScrollBarContainer,
// If we receive an event from the scrollbar, make the view
// component focused so we actually get mousewheel events.
if (source != NULL) {
- Container* vc = parent_->GetContainer();
- if (vc && vc->GetHWND() != GetFocus()) {
+ Widget* widget = parent_->GetWidget();
+ if (widget && widget->GetHWND() != GetFocus()) {
parent_->RequestFocus();
}
}
@@ -227,8 +227,8 @@ NativeScrollBar::~NativeScrollBar() {
void NativeScrollBar::ViewHierarchyChanged(bool is_add, View *parent,
View *child) {
- Container* vc;
- if (is_add && (vc = GetContainer()) && !sb_view_) {
+ Widget* widget;
+ if (is_add && (widget = GetWidget()) && !sb_view_) {
sb_view_ = new HWNDView();
AddChildView(sb_view_);
sb_container_ = new ScrollBarContainer(this);