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

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

Issue 5526008: Simplify the magic required to create IPC message headers a bit. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "app/keyboard_codes.h" 7 #include "app/keyboard_codes.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 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 MAKELPARAM(end.x, end.y)); 222 MAKELPARAM(end.x, end.y));
223 223
224 MessageLoop::current()->PostTask(FROM_HERE, new InvokeTaskLaterTask( 224 MessageLoop::current()->PostTask(FROM_HERE, new InvokeTaskLaterTask(
225 new WindowDragResponseTask(this, reply_message))); 225 new WindowDragResponseTask(this, reply_message)));
226 } else { 226 } else {
227 AutomationMsg_WindowDrag::WriteReplyParams(reply_message, false); 227 AutomationMsg_WindowDrag::WriteReplyParams(reply_message, false);
228 Send(reply_message); 228 Send(reply_message);
229 } 229 }
230 } 230 }
231 231
232 void AutomationProvider::GetTabHWND(int handle, HWND* tab_hwnd) {
233 *tab_hwnd = NULL;
234
235 if (tab_tracker_->ContainsHandle(handle)) {
236 NavigationController* tab = tab_tracker_->GetResource(handle);
237 *tab_hwnd = tab->tab_contents()->GetNativeView();
238 }
239 }
240
241 void AutomationProvider::CreateExternalTab( 232 void AutomationProvider::CreateExternalTab(
242 const IPC::ExternalTabSettings& settings, 233 const IPC::ExternalTabSettings& settings,
243 gfx::NativeWindow* tab_container_window, gfx::NativeWindow* tab_window, 234 gfx::NativeWindow* tab_container_window, gfx::NativeWindow* tab_window,
244 int* tab_handle, int* session_id) { 235 int* tab_handle, int* session_id) {
245 TRACE_EVENT_BEGIN("AutomationProvider::CreateExternalTab", 0, ""); 236 TRACE_EVENT_BEGIN("AutomationProvider::CreateExternalTab", 0, "");
246 237
247 *tab_handle = 0; 238 *tab_handle = 0;
248 *tab_container_window = NULL; 239 *tab_container_window = NULL;
249 *tab_window = NULL; 240 *tab_window = NULL;
250 *session_id = -1; 241 *session_id = -1;
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
542 533
543 void AutomationProvider::OnSetZoomLevel(int handle, int zoom_level) { 534 void AutomationProvider::OnSetZoomLevel(int handle, int zoom_level) {
544 if (tab_tracker_->ContainsHandle(handle)) { 535 if (tab_tracker_->ContainsHandle(handle)) {
545 NavigationController* tab = tab_tracker_->GetResource(handle); 536 NavigationController* tab = tab_tracker_->GetResource(handle);
546 if (tab->tab_contents() && tab->tab_contents()->render_view_host()) { 537 if (tab->tab_contents() && tab->tab_contents()->render_view_host()) {
547 tab->tab_contents()->render_view_host()->Zoom( 538 tab->tab_contents()->render_view_host()->Zoom(
548 static_cast<PageZoom::Function>(zoom_level)); 539 static_cast<PageZoom::Function>(zoom_level));
549 } 540 }
550 } 541 }
551 } 542 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698