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

Side by Side Diff: chrome/browser/ui/touch/frame/touch_browser_frame_view.cc

Issue 7043020: Multi-tab selection: Renaming TabStripModelObserver::TabSelectedAt to ActiveTabChanged (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Updating TODO comments Created 9 years, 7 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/ui/touch/frame/touch_browser_frame_view.h" 5 #include "chrome/browser/ui/touch/frame/touch_browser_frame_view.h"
6 6
7 #include "chrome/browser/profiles/profile.h" 7 #include "chrome/browser/profiles/profile.h"
8 #include "chrome/browser/renderer_host/render_widget_host_view_views.h" 8 #include "chrome/browser/renderer_host/render_widget_host_view_views.h"
9 #include "chrome/browser/tabs/tab_strip_model.h" 9 #include "chrome/browser/tabs/tab_strip_model.h"
10 #include "chrome/browser/ui/browser.h" 10 #include "chrome/browser/ui/browser.h"
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 if (maximize_button()->IsVisible() && 210 if (maximize_button()->IsVisible() &&
211 maximize_button()->GetMirroredBounds().Contains(point)) 211 maximize_button()->GetMirroredBounds().Contains(point))
212 return true; 212 return true;
213 if (minimize_button()->IsVisible() && 213 if (minimize_button()->IsVisible() &&
214 minimize_button()->GetMirroredBounds().Contains(point)) 214 minimize_button()->GetMirroredBounds().Contains(point))
215 return true; 215 return true;
216 216
217 return false; 217 return false;
218 } 218 }
219 219
220 void TouchBrowserFrameView::TabSelectedAt(TabContentsWrapper* old_contents, 220 void TouchBrowserFrameView::ActiveTabChanged(TabContentsWrapper* old_contents,
221 TabContentsWrapper* new_contents, 221 TabContentsWrapper* new_contents,
222 int index, 222 int index,
223 bool user_gesture) { 223 bool user_gesture) {
224 if (new_contents == old_contents) 224 if (new_contents == old_contents)
225 return; 225 return;
226 226
227 TabContents* contents = new_contents->tab_contents(); 227 TabContents* contents = new_contents->tab_contents();
228 if (!TabContentsHasFocus(contents)) 228 if (!TabContentsHasFocus(contents))
229 return; 229 return;
230 230
231 bool* editable = GetFocusedStateAccessor()->GetProperty( 231 bool* editable = GetFocusedStateAccessor()->GetProperty(
232 contents->property_bag()); 232 contents->property_bag());
233 UpdateKeyboardAndLayout(editable ? *editable : false); 233 UpdateKeyboardAndLayout(editable ? *editable : false);
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 310
311 // The keyboard that pops up may end up hiding the text entry. So make sure 311 // The keyboard that pops up may end up hiding the text entry. So make sure
312 // the renderer scrolls when necessary to keep the textfield visible. 312 // the renderer scrolls when necessary to keep the textfield visible.
313 RenderViewHost* host = 313 RenderViewHost* host =
314 browser_view()->browser()->GetSelectedTabContents()->render_view_host(); 314 browser_view()->browser()->GetSelectedTabContents()->render_view_host();
315 host->Send(new ViewMsg_ScrollFocusedEditableNodeIntoView( 315 host->Send(new ViewMsg_ScrollFocusedEditableNodeIntoView(
316 host->routing_id())); 316 host->routing_id()));
317 } 317 }
318 SchedulePaint(); 318 SchedulePaint();
319 } 319 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698