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

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

Issue 11411286: Decouple IsMetroProcess() calls, introducing IsSingleWindowMetroMode(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: keep base/win/metro.h in omnibox_view_win.cc for IsTSFAwareRequired() Created 8 years 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 | « content/browser/DEPS ('k') | content/content_browser.gypi » ('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 <map> 8 #include <map>
9 #include <stack> 9 #include <stack>
10 10
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 #include "ui/base/view_prop.h" 59 #include "ui/base/view_prop.h"
60 #include "ui/base/win/hwnd_util.h" 60 #include "ui/base/win/hwnd_util.h"
61 #include "ui/base/win/mouse_wheel_util.h" 61 #include "ui/base/win/mouse_wheel_util.h"
62 #include "ui/gfx/canvas.h" 62 #include "ui/gfx/canvas.h"
63 #include "ui/gfx/rect.h" 63 #include "ui/gfx/rect.h"
64 #include "ui/gfx/screen.h" 64 #include "ui/gfx/screen.h"
65 #include "webkit/glue/webcursor.h" 65 #include "webkit/glue/webcursor.h"
66 #include "webkit/plugins/npapi/plugin_constants_win.h" 66 #include "webkit/plugins/npapi/plugin_constants_win.h"
67 #include "webkit/plugins/npapi/webplugin.h" 67 #include "webkit/plugins/npapi/webplugin.h"
68 #include "webkit/plugins/npapi/webplugin_delegate_impl.h" 68 #include "webkit/plugins/npapi/webplugin_delegate_impl.h"
69 #include "win8/util/win8_util.h"
69 70
70 using base::TimeDelta; 71 using base::TimeDelta;
71 using base::TimeTicks; 72 using base::TimeTicks;
72 using ui::ViewProp; 73 using ui::ViewProp;
73 using WebKit::WebInputEvent; 74 using WebKit::WebInputEvent;
74 using WebKit::WebInputEventFactory; 75 using WebKit::WebInputEventFactory;
75 using WebKit::WebMouseEvent; 76 using WebKit::WebMouseEvent;
76 using WebKit::WebTextDirection; 77 using WebKit::WebTextDirection;
77 78
78 namespace content { 79 namespace content {
(...skipping 653 matching lines...) Expand 10 before | Expand all | Expand 10 after
732 // We've been told to destroy. 733 // We've been told to destroy.
733 // By clearing close_on_deactivate_, we prevent further deactivations 734 // By clearing close_on_deactivate_, we prevent further deactivations
734 // (caused by windows messages resulting from the DestroyWindow) from 735 // (caused by windows messages resulting from the DestroyWindow) from
735 // triggering further destructions. The deletion of this is handled by 736 // triggering further destructions. The deletion of this is handled by
736 // OnFinalMessage(); 737 // OnFinalMessage();
737 close_on_deactivate_ = false; 738 close_on_deactivate_ = false;
738 render_widget_host_ = NULL; 739 render_widget_host_ = NULL;
739 being_destroyed_ = true; 740 being_destroyed_ = true;
740 CleanupCompositorWindow(); 741 CleanupCompositorWindow();
741 742
742 if (is_fullscreen_ && base::win::IsMetroProcess()) { 743 if (is_fullscreen_ && win8::IsSingleWindowMetroMode()) {
743 MetroCloseFrameWindow close_frame_window = 744 MetroCloseFrameWindow close_frame_window =
744 reinterpret_cast<MetroCloseFrameWindow>( 745 reinterpret_cast<MetroCloseFrameWindow>(
745 ::GetProcAddress(base::win::GetMetroModule(), "CloseFrameWindow")); 746 ::GetProcAddress(base::win::GetMetroModule(), "CloseFrameWindow"));
746 DCHECK(close_frame_window); 747 DCHECK(close_frame_window);
747 close_frame_window(m_hWnd); 748 close_frame_window(m_hWnd);
748 } 749 }
749 750
750 DestroyWindow(); 751 DestroyWindow();
751 } 752 }
752 753
(...skipping 2018 matching lines...) Expand 10 before | Expand all | Expand 10 after
2771 // Do not touch any members at this point, |this| has been deleted. 2772 // Do not touch any members at this point, |this| has been deleted.
2772 } 2773 }
2773 2774
2774 void RenderWidgetHostViewWin::DoPopupOrFullscreenInit(HWND parent_hwnd, 2775 void RenderWidgetHostViewWin::DoPopupOrFullscreenInit(HWND parent_hwnd,
2775 const gfx::Rect& pos, 2776 const gfx::Rect& pos,
2776 DWORD ex_style) { 2777 DWORD ex_style) {
2777 Create(parent_hwnd, NULL, NULL, WS_POPUP, ex_style); 2778 Create(parent_hwnd, NULL, NULL, WS_POPUP, ex_style);
2778 MoveWindow(pos.x(), pos.y(), pos.width(), pos.height(), TRUE); 2779 MoveWindow(pos.x(), pos.y(), pos.width(), pos.height(), TRUE);
2779 ShowWindow(IsActivatable() ? SW_SHOW : SW_SHOWNA); 2780 ShowWindow(IsActivatable() ? SW_SHOW : SW_SHOWNA);
2780 2781
2781 if (is_fullscreen_ && base::win::IsMetroProcess()) { 2782 if (is_fullscreen_ && win8::IsSingleWindowMetroMode()) {
2782 MetroSetFrameWindow set_frame_window = 2783 MetroSetFrameWindow set_frame_window =
2783 reinterpret_cast<MetroSetFrameWindow>( 2784 reinterpret_cast<MetroSetFrameWindow>(
2784 ::GetProcAddress(base::win::GetMetroModule(), "SetFrameWindow")); 2785 ::GetProcAddress(base::win::GetMetroModule(), "SetFrameWindow"));
2785 DCHECK(set_frame_window); 2786 DCHECK(set_frame_window);
2786 set_frame_window(m_hWnd); 2787 set_frame_window(m_hWnd);
2787 } 2788 }
2788 } 2789 }
2789 2790
2790 CPoint RenderWidgetHostViewWin::GetClientCenter() const { 2791 CPoint RenderWidgetHostViewWin::GetClientCenter() const {
2791 CRect rect; 2792 CRect rect;
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
2980 //////////////////////////////////////////////////////////////////////////////// 2981 ////////////////////////////////////////////////////////////////////////////////
2981 // RenderWidgetHostView, public: 2982 // RenderWidgetHostView, public:
2982 2983
2983 // static 2984 // static
2984 RenderWidgetHostView* RenderWidgetHostView::CreateViewForWidget( 2985 RenderWidgetHostView* RenderWidgetHostView::CreateViewForWidget(
2985 RenderWidgetHost* widget) { 2986 RenderWidgetHost* widget) {
2986 return new RenderWidgetHostViewWin(widget); 2987 return new RenderWidgetHostViewWin(widget);
2987 } 2988 }
2988 2989
2989 } // namespace content 2990 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/DEPS ('k') | content/content_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698