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

Side by Side Diff: chrome/browser/automation/automation_provider_win.cc

Issue 8343023: rename Run in MessageLoopForUI to RunWithDispatcher (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync Created 9 years, 2 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "chrome/browser/automation/automation_provider.h" 5 #include "chrome/browser/automation/automation_provider.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "base/json/json_reader.h" 9 #include "base/json/json_reader.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 ui::EF_CONTROL_DOWN), 210 ui::EF_CONTROL_DOWN),
211 ((flags & ui::EF_SHIFT_DOWN) == 211 ((flags & ui::EF_SHIFT_DOWN) ==
212 ui::EF_SHIFT_DOWN), 212 ui::EF_SHIFT_DOWN),
213 ((flags & ui::EF_ALT_DOWN) == ui::EF_ALT_DOWN), 213 ((flags & ui::EF_ALT_DOWN) == ui::EF_ALT_DOWN),
214 false, 214 false,
215 MessageLoop::QuitClosure()); 215 MessageLoop::QuitClosure());
216 MessageLoopForUI* loop = MessageLoopForUI::current(); 216 MessageLoopForUI* loop = MessageLoopForUI::current();
217 bool did_allow_task_nesting = loop->NestableTasksAllowed(); 217 bool did_allow_task_nesting = loop->NestableTasksAllowed();
218 loop->SetNestableTasksAllowed(true); 218 loop->SetNestableTasksAllowed(true);
219 views::AcceleratorHandler handler; 219 views::AcceleratorHandler handler;
220 loop->Run(&handler); 220 loop->RunWithDispatcher(&handler);
221 loop->SetNestableTasksAllowed(did_allow_task_nesting); 221 loop->SetNestableTasksAllowed(did_allow_task_nesting);
222 } 222 }
223 SendMessage(top_level_hwnd, up_message, wparam_flags, 223 SendMessage(top_level_hwnd, up_message, wparam_flags,
224 MAKELPARAM(end.x, end.y)); 224 MAKELPARAM(end.x, end.y));
225 225
226 MessageLoop::current()->PostTask(FROM_HERE, new InvokeTaskLaterTask( 226 MessageLoop::current()->PostTask(FROM_HERE, new InvokeTaskLaterTask(
227 new WindowDragResponseTask(this, reply_message))); 227 new WindowDragResponseTask(this, reply_message)));
228 } else { 228 } else {
229 AutomationMsg_WindowDrag::WriteReplyParams(reply_message, false); 229 AutomationMsg_WindowDrag::WriteReplyParams(reply_message, false);
230 Send(reply_message); 230 Send(reply_message);
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 void AutomationProvider::OnSetZoomLevel(int handle, int zoom_level) { 465 void AutomationProvider::OnSetZoomLevel(int handle, int zoom_level) {
466 if (tab_tracker_->ContainsHandle(handle)) { 466 if (tab_tracker_->ContainsHandle(handle)) {
467 NavigationController* tab = tab_tracker_->GetResource(handle); 467 NavigationController* tab = tab_tracker_->GetResource(handle);
468 if (tab->tab_contents() && tab->tab_contents()->render_view_host()) { 468 if (tab->tab_contents() && tab->tab_contents()->render_view_host()) {
469 RenderViewHost* host = tab->tab_contents()->render_view_host(); 469 RenderViewHost* host = tab->tab_contents()->render_view_host();
470 PageZoom::Function zoom = static_cast<PageZoom::Function>(zoom_level); 470 PageZoom::Function zoom = static_cast<PageZoom::Function>(zoom_level);
471 host->Zoom(zoom); 471 host->Zoom(zoom);
472 } 472 }
473 } 473 }
474 } 474 }
OLDNEW
« no previous file with comments | « chrome/browser/autocomplete/search_provider_unittest.cc ('k') | chrome/browser/chrome_browser_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698