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

Side by Side Diff: ui/aura/remote_root_window_host_win.cc

Issue 130223002: Have browser process shutdown metro viewer on Metro -> Metro restart. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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
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 "ui/aura/remote_root_window_host_win.h" 5 #include "ui/aura/remote_root_window_host_win.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 on_failure); 135 on_failure);
136 } 136 }
137 137
138 void HandleActivateDesktop(const base::FilePath& shortcut, 138 void HandleActivateDesktop(const base::FilePath& shortcut,
139 bool ash_exit) { 139 bool ash_exit) {
140 DCHECK(aura::RemoteRootWindowHostWin::Instance()); 140 DCHECK(aura::RemoteRootWindowHostWin::Instance());
141 aura::RemoteRootWindowHostWin::Instance()->HandleActivateDesktop(shortcut, 141 aura::RemoteRootWindowHostWin::Instance()->HandleActivateDesktop(shortcut,
142 ash_exit); 142 ash_exit);
143 } 143 }
144 144
145 void HandleMetroExit() {
146 DCHECK(aura::RemoteRootWindowHostWin::Instance());
147 aura::RemoteRootWindowHostWin::Instance()->HandleMetroExit();
148 }
149
150
sky 2014/01/09 16:40:05 nit: only one newline.
zturner 2014/01/10 19:00:26 Done.
145 RemoteRootWindowHostWin* g_instance = NULL; 151 RemoteRootWindowHostWin* g_instance = NULL;
146 152
147 RemoteRootWindowHostWin* RemoteRootWindowHostWin::Instance() { 153 RemoteRootWindowHostWin* RemoteRootWindowHostWin::Instance() {
148 if (g_instance) 154 if (g_instance)
149 return g_instance; 155 return g_instance;
150 return Create(gfx::Rect()); 156 return Create(gfx::Rect());
151 } 157 }
152 158
153 RemoteRootWindowHostWin* RemoteRootWindowHostWin::Create( 159 RemoteRootWindowHostWin* RemoteRootWindowHostWin::Create(
154 const gfx::Rect& bounds) { 160 const gfx::Rect& bounds) {
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 } 247 }
242 248
243 void RemoteRootWindowHostWin::HandleActivateDesktop( 249 void RemoteRootWindowHostWin::HandleActivateDesktop(
244 const base::FilePath& shortcut, 250 const base::FilePath& shortcut,
245 bool ash_exit) { 251 bool ash_exit) {
246 if (!host_) 252 if (!host_)
247 return; 253 return;
248 host_->Send(new MetroViewerHostMsg_ActivateDesktop(shortcut, ash_exit)); 254 host_->Send(new MetroViewerHostMsg_ActivateDesktop(shortcut, ash_exit));
249 } 255 }
250 256
257 void RemoteRootWindowHostWin::HandleMetroExit() {
258 if (!host_)
259 return;
260 host_->Send(new MetroViewerHostMsg_MetroExit());
261 }
262
263
251 void RemoteRootWindowHostWin::HandleOpenFile( 264 void RemoteRootWindowHostWin::HandleOpenFile(
252 const base::string16& title, 265 const base::string16& title,
253 const base::FilePath& default_path, 266 const base::FilePath& default_path,
254 const base::string16& filter, 267 const base::string16& filter,
255 const OpenFileCompletion& on_success, 268 const OpenFileCompletion& on_success,
256 const FileSelectionCanceled& on_failure) { 269 const FileSelectionCanceled& on_failure) {
257 if (!host_) 270 if (!host_)
258 return; 271 return;
259 272
260 // Can only have one of these operations in flight. 273 // Can only have one of these operations in flight.
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after
725 } 738 }
726 739
727 void RemoteRootWindowHostWin::SetEventFlags(uint32 flags) { 740 void RemoteRootWindowHostWin::SetEventFlags(uint32 flags) {
728 if (flags == event_flags_) 741 if (flags == event_flags_)
729 return; 742 return;
730 event_flags_ = flags; 743 event_flags_ = flags;
731 SetVirtualKeyStates(event_flags_); 744 SetVirtualKeyStates(event_flags_);
732 } 745 }
733 746
734 } // namespace aura 747 } // namespace aura
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698