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

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

Issue 6462022: It turns out I had the sense of the GetLocalBounds bool wrong everywhere, so ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 10 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/testing_automation_provider.h" 5 #include "chrome/browser/automation/testing_automation_provider.h"
6 6
7 #include "chrome/browser/automation/automation_browser_tracker.h" 7 #include "chrome/browser/automation/automation_browser_tracker.h"
8 #include "chrome/browser/automation/automation_window_tracker.h" 8 #include "chrome/browser/automation/automation_window_tracker.h"
9 #include "chrome/browser/browser_window.h" 9 #include "chrome/browser/browser_window.h"
10 #include "chrome/browser/ui/views/frame/browser_view.h" 10 #include "chrome/browser/ui/views/frame/browser_view.h"
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 views::RootView* root_view = views::Widget::FindRootView(window); 124 views::RootView* root_view = views::Widget::FindRootView(window);
125 if (root_view) { 125 if (root_view) {
126 views::View* view = root_view->GetViewByID(view_id); 126 views::View* view = root_view->GetViewByID(view_id);
127 if (view) { 127 if (view) {
128 *success = true; 128 *success = true;
129 gfx::Point point; 129 gfx::Point point;
130 if (screen_coordinates) 130 if (screen_coordinates)
131 views::View::ConvertPointToScreen(view, &point); 131 views::View::ConvertPointToScreen(view, &point);
132 else 132 else
133 views::View::ConvertPointToView(view, root_view, &point); 133 views::View::ConvertPointToView(view, root_view, &point);
134 *bounds = view->GetLocalBounds(); 134 *bounds = view->GetContentsBounds();
135 bounds->set_origin(point); 135 bounds->set_origin(point);
136 } 136 }
137 } 137 }
138 } 138 }
139 } 139 }
140 140
141 void TestingAutomationProvider::GetFocusedViewID(int handle, int* view_id) { 141 void TestingAutomationProvider::GetFocusedViewID(int handle, int* view_id) {
142 *view_id = -1; 142 *view_id = -1;
143 if (window_tracker_->ContainsHandle(handle)) { 143 if (window_tracker_->ContainsHandle(handle)) {
144 gfx::NativeWindow window = window_tracker_->GetResource(handle); 144 gfx::NativeWindow window = window_tracker_->GetResource(handle);
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 reply_message, true); 187 reply_message, true);
188 Send(reply_message); 188 Send(reply_message);
189 return; 189 return;
190 } 190 }
191 191
192 // Otherwise, register this reply message with the waiter, 192 // Otherwise, register this reply message with the waiter,
193 // which will handle responding to this IPC when the popup 193 // which will handle responding to this IPC when the popup
194 // menu opens. 194 // menu opens.
195 popup_menu_waiter_->set_reply_message(reply_message); 195 popup_menu_waiter_->set_reply_message(reply_message);
196 } 196 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/frame/bubble_frame_view.cc » ('j') | chrome/chrome_browser.gypi » ('J')

Powered by Google App Engine
This is Rietveld 408576698