summaryrefslogtreecommitdiffstats
path: root/views/controls
diff options
context:
space:
mode:
Diffstat (limited to 'views/controls')
-rw-r--r--views/controls/menu/chrome_menu.cc2
-rw-r--r--views/controls/native_control.cc3
-rw-r--r--views/controls/native_control_win.cc3
-rw-r--r--views/controls/tabbed_pane.cc2
-rw-r--r--views/controls/textfield/native_textfield_win.cc3
-rwxr-xr-xviews/controls/tree/tree_view.cc4
6 files changed, 11 insertions, 6 deletions
diff --git a/views/controls/menu/chrome_menu.cc b/views/controls/menu/chrome_menu.cc
index f6e3950..b05552f 100644
--- a/views/controls/menu/chrome_menu.cc
+++ b/views/controls/menu/chrome_menu.cc
@@ -685,7 +685,7 @@ class MenuHost : public WidgetWin {
const gfx::Rect& bounds,
View* contents_view,
bool do_capture) {
- WidgetWin::Init(parent, bounds);
+ WidgetWin::Init(parent, bounds, true);
SetContentsView(contents_view);
// We don't want to take focus away from the hosting window.
ShowWindow(SW_SHOWNA);
diff --git a/views/controls/native_control.cc b/views/controls/native_control.cc
index 5fd8349..2df961e 100644
--- a/views/controls/native_control.cc
+++ b/views/controls/native_control.cc
@@ -367,7 +367,8 @@ LRESULT CALLBACK NativeControl::NativeControlWndProc(HWND window, UINT message,
return 0;
} else if (message == WM_SETFOCUS) {
// Let the focus manager know that the focus changed.
- FocusManager* focus_manager = native_control->GetFocusManager();
+ FocusManager* focus_manager =
+ FocusManager::GetFocusManager(native_control->GetNativeControlHWND());
if (focus_manager) {
focus_manager->SetFocusedView(native_control);
} else {
diff --git a/views/controls/native_control_win.cc b/views/controls/native_control_win.cc
index 32c7261..b6111fd 100644
--- a/views/controls/native_control_win.cc
+++ b/views/controls/native_control_win.cc
@@ -196,7 +196,8 @@ LRESULT NativeControlWin::NativeControlWndProc(HWND window,
return 0;
} else if (message == WM_SETFOCUS) {
// Let the focus manager know that the focus changed.
- FocusManager* focus_manager = native_control->GetFocusManager();
+ FocusManager* focus_manager =
+ FocusManager::GetFocusManager(native_control->native_view());
if (focus_manager) {
focus_manager->SetFocusedView(native_control->focus_view());
} else {
diff --git a/views/controls/tabbed_pane.cc b/views/controls/tabbed_pane.cc
index b7c41bc..a162131 100644
--- a/views/controls/tabbed_pane.cc
+++ b/views/controls/tabbed_pane.cc
@@ -172,7 +172,7 @@ HWND TabbedPane::CreateNativeControl(HWND parent_container) {
// Create the view container which is a child of the TabControl.
content_window_ = new WidgetWin();
- content_window_->Init(tab_control_, gfx::Rect());
+ content_window_->Init(tab_control_, gfx::Rect(), false);
// Explicitly setting the WS_EX_LAYOUTRTL property for the HWND (see above
// for a thorough explanation regarding why we waited until |content_window_|
diff --git a/views/controls/textfield/native_textfield_win.cc b/views/controls/textfield/native_textfield_win.cc
index cda6629..1ccf651 100644
--- a/views/controls/textfield/native_textfield_win.cc
+++ b/views/controls/textfield/native_textfield_win.cc
@@ -681,7 +681,8 @@ void NativeTextfieldWin::OnPaste() {
void NativeTextfieldWin::OnSetFocus(HWND hwnd) {
SetMsgHandled(FALSE); // We still want the default processing of the message.
- views::FocusManager* focus_manager = textfield_->GetFocusManager();
+ views::FocusManager* focus_manager =
+ views::FocusManager::GetFocusManager(m_hWnd);
if (!focus_manager) {
NOTREACHED();
return;
diff --git a/views/controls/tree/tree_view.cc b/views/controls/tree/tree_view.cc
index 5a2fb42..95a7210 100755
--- a/views/controls/tree/tree_view.cc
+++ b/views/controls/tree/tree_view.cc
@@ -471,11 +471,13 @@ bool TreeView::OnKeyDown(int virtual_key_code) {
} else if (virtual_key_code == VK_RETURN && !process_enter_) {
Widget* widget = GetWidget();
DCHECK(widget);
+ FocusManager* fm = FocusManager::GetFocusManager(widget->GetNativeView());
+ DCHECK(fm);
Accelerator accelerator(Accelerator(static_cast<int>(virtual_key_code),
win_util::IsShiftPressed(),
win_util::IsCtrlPressed(),
win_util::IsAltPressed()));
- GetFocusManager()->ProcessAccelerator(accelerator);
+ fm->ProcessAccelerator(accelerator);
return true;
}
return false;