OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "views/widget/widget_win.h" | 5 #include "views/widget/widget_win.h" |
6 | 6 |
7 #include "app/gfx/canvas.h" | 7 #include "app/gfx/canvas.h" |
8 #include "app/gfx/path.h" | 8 #include "app/gfx/path.h" |
9 #include "app/win_util.h" | 9 #include "app/win_util.h" |
10 #include "base/gfx/native_theme.h" | 10 #include "base/gfx/native_theme.h" |
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
385 } | 385 } |
386 | 386 |
387 bool WidgetWin::IsVisible() const { | 387 bool WidgetWin::IsVisible() const { |
388 return !!::IsWindowVisible(GetNativeView()); | 388 return !!::IsWindowVisible(GetNativeView()); |
389 } | 389 } |
390 | 390 |
391 bool WidgetWin::IsActive() const { | 391 bool WidgetWin::IsActive() const { |
392 return win_util::IsWindowActive(GetNativeView()); | 392 return win_util::IsWindowActive(GetNativeView()); |
393 } | 393 } |
394 | 394 |
| 395 void WidgetWin::GenerateMousePressedForView(View* view, |
| 396 const gfx::Point& point) { |
| 397 gfx::Point point_in_widget(point); |
| 398 View::ConvertPointToWidget(view, &point_in_widget); |
| 399 root_view_->SetMouseHandler(view); |
| 400 ProcessMousePressed(point_in_widget.ToPOINT(), MK_LBUTTON, false, false); |
| 401 } |
| 402 |
395 TooltipManager* WidgetWin::GetTooltipManager() { | 403 TooltipManager* WidgetWin::GetTooltipManager() { |
396 return tooltip_manager_.get(); | 404 return tooltip_manager_.get(); |
397 } | 405 } |
398 | 406 |
399 ThemeProvider* WidgetWin::GetThemeProvider() const { | 407 ThemeProvider* WidgetWin::GetThemeProvider() const { |
400 Widget* widget = GetRootWidget(); | 408 Widget* widget = GetRootWidget(); |
401 if (widget && widget != this) { | 409 if (widget && widget != this) { |
402 // Attempt to get the theme provider, and fall back to the default theme | 410 // Attempt to get the theme provider, and fall back to the default theme |
403 // provider if not found. | 411 // provider if not found. |
404 ThemeProvider* provider = widget->GetThemeProvider(); | 412 ThemeProvider* provider = widget->GetThemeProvider(); |
(...skipping 669 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1074 } | 1082 } |
1075 if (WA_INACTIVE == activation_state) { | 1083 if (WA_INACTIVE == activation_state) { |
1076 widget->focus_manager_->StoreFocusedView(); | 1084 widget->focus_manager_->StoreFocusedView(); |
1077 } else { | 1085 } else { |
1078 // We must restore the focus after the message has been DefProc'ed as it | 1086 // We must restore the focus after the message has been DefProc'ed as it |
1079 // does set the focus to the last focused HWND. | 1087 // does set the focus to the last focused HWND. |
1080 widget->focus_manager_->RestoreFocusedView(); | 1088 widget->focus_manager_->RestoreFocusedView(); |
1081 } | 1089 } |
1082 } | 1090 } |
1083 } // namespace views | 1091 } // namespace views |
OLD | NEW |