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

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

Issue 211033: Automated ui test porting + cleanup:... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: all green\! Created 11 years, 3 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/gfx/point.h" 7 #include "base/gfx/point.h"
8 #include "base/gfx/rect.h" 8 #include "base/gfx/rect.h"
9 #include "chrome/browser/gtk/browser_window_gtk.h" 9 #include "chrome/browser/gtk/browser_window_gtk.h"
10 #include "chrome/browser/gtk/view_id_util.h" 10 #include "chrome/browser/gtk/view_id_util.h"
11 #include "chrome/common/gtk_util.h" 11 #include "chrome/common/gtk_util.h"
12 #include "chrome/test/automation/automation_messages.h"
12 13
13 void AutomationProvider::SetWindowBounds(int handle, const gfx::Rect& bounds, 14 void AutomationProvider::SetWindowBounds(int handle, const gfx::Rect& bounds,
14 bool* success) { 15 bool* success) {
15 *success = false; 16 *success = false;
16 GtkWindow* window = window_tracker_->GetResource(handle); 17 GtkWindow* window = window_tracker_->GetResource(handle);
17 if (window) { 18 if (window) {
18 gtk_window_move(window, bounds.x(), bounds.height()); 19 gtk_window_move(window, bounds.x(), bounds.height());
19 gtk_window_resize(window, bounds.width(), bounds.height()); 20 gtk_window_resize(window, bounds.width(), bounds.height());
20 *success = true; 21 *success = true;
21 } 22 }
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 x = point.x(); 57 x = point.x();
57 y = point.y(); 58 y = point.y();
58 } else { 59 } else {
59 gtk_widget_translate_coordinates(widget, GTK_WIDGET(window), 60 gtk_widget_translate_coordinates(widget, GTK_WIDGET(window),
60 0, 0, &x, &y); 61 0, 0, &x, &y);
61 } 62 }
62 bounds->set_origin(gfx::Point(x, y)); 63 bounds->set_origin(gfx::Point(x, y));
63 } 64 }
64 } 65 }
65 66
66 void AutomationProvider::ActivateWindow(int handle) { NOTIMPLEMENTED(); } 67 void AutomationProvider::ActivateWindow(int handle) {
68 NOTIMPLEMENTED();
69 }
70
71 void AutomationProvider::IsWindowMaximized(int handle, bool* is_maximized,
72 bool* success) {
73 *success = false;
74 NOTIMPLEMENTED();
75 }
67 76
68 void AutomationProvider::GetFocusedViewID(int handle, int* view_id) { 77 void AutomationProvider::GetFocusedViewID(int handle, int* view_id) {
69 NOTIMPLEMENTED(); 78 NOTIMPLEMENTED();
70 } 79 }
71 80
72 void AutomationProvider::PrintAsync(int tab_handle) { 81 void AutomationProvider::PrintAsync(int tab_handle) {
73 NOTIMPLEMENTED(); 82 NOTIMPLEMENTED();
74 } 83 }
75 84
76 void AutomationProvider::SetInitialFocus(const IPC::Message& message, 85 void AutomationProvider::SetInitialFocus(const IPC::Message& message,
77 int handle, bool reverse) { 86 int handle, bool reverse) {
78 NOTIMPLEMENTED(); 87 NOTIMPLEMENTED();
79 } 88 }
80 89
81 void AutomationProvider::GetBookmarkBarVisibility(int handle, bool* visible, 90 void AutomationProvider::GetBookmarkBarVisibility(int handle, bool* visible,
82 bool* animating) { 91 bool* animating) {
83 *visible = false; 92 *visible = false;
84 *animating = false; 93 *animating = false;
85 NOTIMPLEMENTED(); 94 NOTIMPLEMENTED();
86 } 95 }
96
97 void AutomationProvider::WindowSimulateDrag(int handle,
98 std::vector<gfx::Point> drag_path,
99 int flags,
100 bool press_escape_en_route,
101 IPC::Message* reply_message) {
102 NOTIMPLEMENTED();
103 AutomationMsg_WindowDrag::WriteReplyParams(reply_message, false);
104 Send(reply_message);
105 }
106
107 void AutomationProvider::TerminateSession(int handle, bool* success) {
108 *success = false;
109 NOTIMPLEMENTED();
110 }
111
112 void AutomationProvider::GetWindowBounds(int handle, gfx::Rect* bounds,
113 bool* result) {
114 *result = false;
115 NOTIMPLEMENTED();
116 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698