| 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:
|
|
|
|
|