Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4430)

Unified Diff: chrome/browser/ui/views/frame/browser_frame_win.cc

Issue 10867096: Make HWNDMessageHandler subclass WindowImpl. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/views/frame/browser_frame_win.h ('k') | ui/views/widget/native_widget_win.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/frame/browser_frame_win.cc
===================================================================
--- chrome/browser/ui/views/frame/browser_frame_win.cc (revision 153741)
+++ chrome/browser/ui/views/frame/browser_frame_win.cc (working copy)
@@ -199,17 +199,48 @@
WPARAM w_param,
LPARAM l_param,
LRESULT* result) {
+ static const UINT metro_navigation_search_message =
+ RegisterWindowMessage(chrome::kMetroNavigationAndSearchMessage);
+
+ static const UINT metro_get_current_tab_info_message =
+ RegisterWindowMessage(chrome::kMetroGetCurrentTabInfoMessage);
+
+ if (message == metro_navigation_search_message) {
+ HandleMetroNavSearchRequest(w_param, l_param);
+ return false;
+ } else if (message == metro_get_current_tab_info_message) {
+ GetMetroCurrentTabInfo(w_param);
+ return false;
+ }
+
switch (message) {
+ case WM_ACTIVATE:
+ if (LOWORD(w_param) != WA_INACTIVE)
+ CacheMinimizeButtonDelta();
+ return false;
+ case WM_PRINT:
+ if (base::win::IsMetroProcess()) {
+ // This message is sent by the AnimateWindow API which is used in metro
+ // mode to flip between active chrome windows.
+ RECT client_rect = {0};
+ ::GetClientRect(GetNativeView(), &client_rect);
+ HDC dest_dc = reinterpret_cast<HDC>(w_param);
+ DCHECK(dest_dc);
+ HDC src_dc = ::GetDC(GetNativeView());
+ ::BitBlt(dest_dc, 0, 0, client_rect.right - client_rect.left,
+ client_rect.bottom - client_rect.top, src_dc, 0, 0,
+ SRCCOPY);
+ ::ReleaseDC(GetNativeView(), src_dc);
+ *result = 0;
+ return true;
+ }
+ return false;
case WM_ENDSESSION:
browser::SessionEnding();
return true;
case WM_INITMENUPOPUP:
system_menu_->UpdateStates();
return true;
- case WM_ACTIVATE:
- if (LOWORD(w_param) != WA_INACTIVE)
- CacheMinimizeButtonDelta();
- return false;
}
return false;
}
@@ -381,36 +412,6 @@
flip_window_fn();
}
-LRESULT BrowserFrameWin::OnWndProc(UINT message,
- WPARAM w_param,
- LPARAM l_param) {
- static const UINT metro_navigation_search_message =
- RegisterWindowMessage(chrome::kMetroNavigationAndSearchMessage);
-
- static const UINT metro_get_current_tab_info_message =
- RegisterWindowMessage(chrome::kMetroGetCurrentTabInfoMessage);
-
- if (message == metro_navigation_search_message) {
- HandleMetroNavSearchRequest(w_param, l_param);
- } else if (message == metro_get_current_tab_info_message) {
- GetMetroCurrentTabInfo(w_param);
- } else if (message == WM_PRINT && base::win::IsMetroProcess()) {
- // This message is sent by the AnimateWindow API which is used in metro
- // mode to flip between active chrome windows.
- RECT client_rect = {0};
- ::GetClientRect(GetNativeView(), &client_rect);
- HDC dest_dc = reinterpret_cast<HDC>(w_param);
- DCHECK(dest_dc);
- HDC src_dc = ::GetDC(GetNativeView());
- ::BitBlt(dest_dc, 0, 0, client_rect.right - client_rect.left,
- client_rect.bottom - client_rect.top, src_dc, 0, 0,
- SRCCOPY);
- ::ReleaseDC(GetNativeView(), src_dc);
- return 0;
- }
- return views::NativeWidgetWin::OnWndProc(message, w_param, l_param);
-}
-
///////////////////////////////////////////////////////////////////////////////
// BrowserFrameWin, private:
« no previous file with comments | « chrome/browser/ui/views/frame/browser_frame_win.h ('k') | ui/views/widget/native_widget_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698