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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_win.cc

Issue 10560015: Implement base::win::IsMetroProcess. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 8 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/common/pepper_flash.cc ('k') | ui/base/layout.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/browser/renderer_host/render_widget_host_view_win.h" 5 #include "content/browser/renderer_host/render_widget_host_view_win.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <peninputpanel_i.c> 8 #include <peninputpanel_i.c>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after
599 599
600 RenderWidgetHostViewWin::~RenderWidgetHostViewWin() { 600 RenderWidgetHostViewWin::~RenderWidgetHostViewWin() {
601 UnlockMouse(); 601 UnlockMouse();
602 ResetTooltip(); 602 ResetTooltip();
603 } 603 }
604 604
605 void RenderWidgetHostViewWin::CreateWnd(HWND parent) { 605 void RenderWidgetHostViewWin::CreateWnd(HWND parent) {
606 // ATL function to create the window. 606 // ATL function to create the window.
607 Create(parent); 607 Create(parent);
608 if (base::win::GetVersion() >= base::win::VERSION_WIN8 && 608 if (base::win::GetVersion() >= base::win::VERSION_WIN8 &&
609 !base::win::GetMetroModule()) { 609 !base::win::IsMetroProcess()) {
610 virtual_keyboard_.CreateInstance(CLSID_TextInputPanel, NULL, CLSCTX_INPROC); 610 virtual_keyboard_.CreateInstance(CLSID_TextInputPanel, NULL, CLSCTX_INPROC);
611 if (virtual_keyboard_) { 611 if (virtual_keyboard_) {
612 virtual_keyboard_->put_AttachedEditWindow(m_hWnd); 612 virtual_keyboard_->put_AttachedEditWindow(m_hWnd);
613 virtual_keyboard_->SetInPlaceVisibility(FALSE); 613 virtual_keyboard_->SetInPlaceVisibility(FALSE);
614 } else { 614 } else {
615 NOTREACHED() << "Failed to create instance of pen input panel"; 615 NOTREACHED() << "Failed to create instance of pen input panel";
616 } 616 }
617 } 617 }
618 } 618 }
619 619
(...skipping 2097 matching lines...) Expand 10 before | Expand all | Expand 10 after
2717 TRACE_EVENT0("browser", "RenderWidgetHostViewWin::OnPointerMessage"); 2717 TRACE_EVENT0("browser", "RenderWidgetHostViewWin::OnPointerMessage");
2718 POINT point = {0}; 2718 POINT point = {0};
2719 2719
2720 point.x = GET_X_LPARAM(lparam); 2720 point.x = GET_X_LPARAM(lparam);
2721 point.y = GET_Y_LPARAM(lparam); 2721 point.y = GET_Y_LPARAM(lparam);
2722 ScreenToClient(&point); 2722 ScreenToClient(&point);
2723 2723
2724 lparam = MAKELPARAM(point.x, point.y); 2724 lparam = MAKELPARAM(point.x, point.y);
2725 2725
2726 if (message == WM_POINTERDOWN) { 2726 if (message == WM_POINTERDOWN) {
2727 if (!base::win::GetMetroModule()) { 2727 if (!base::win::IsMetroProcess()) {
2728 SetFocus(); 2728 SetFocus();
2729 pointer_down_context_ = true; 2729 pointer_down_context_ = true;
2730 received_focus_change_after_pointer_down_ = false; 2730 received_focus_change_after_pointer_down_ = false;
2731 MessageLoop::current()->PostDelayedTask(FROM_HERE, 2731 MessageLoop::current()->PostDelayedTask(FROM_HERE,
2732 base::Bind(&RenderWidgetHostViewWin::ResetPointerDownContext, 2732 base::Bind(&RenderWidgetHostViewWin::ResetPointerDownContext,
2733 weak_factory_.GetWeakPtr()), 2733 weak_factory_.GetWeakPtr()),
2734 base::TimeDelta::FromMilliseconds(kPointerDownContextResetDelay)); 2734 base::TimeDelta::FromMilliseconds(kPointerDownContextResetDelay));
2735 } 2735 }
2736 } 2736 }
2737 handled = FALSE; 2737 handled = FALSE;
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
3085 void RenderWidgetHostViewWin::ResetPointerDownContext() { 3085 void RenderWidgetHostViewWin::ResetPointerDownContext() {
3086 // If the default focus on the page is on an edit field and we did not 3086 // If the default focus on the page is on an edit field and we did not
3087 // receive a focus change in the context of a pointer down message, it means 3087 // receive a focus change in the context of a pointer down message, it means
3088 // that the pointer down message occurred on the edit field and we should 3088 // that the pointer down message occurred on the edit field and we should
3089 // display the on screen keyboard 3089 // display the on screen keyboard
3090 if (!received_focus_change_after_pointer_down_ && virtual_keyboard_) 3090 if (!received_focus_change_after_pointer_down_ && virtual_keyboard_)
3091 DisplayOnScreenKeyboardIfNeeded(); 3091 DisplayOnScreenKeyboardIfNeeded();
3092 received_focus_change_after_pointer_down_ = false; 3092 received_focus_change_after_pointer_down_ = false;
3093 pointer_down_context_ = false; 3093 pointer_down_context_ = false;
3094 } 3094 }
OLDNEW
« no previous file with comments | « chrome/common/pepper_flash.cc ('k') | ui/base/layout.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698