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

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: Rebasing 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 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 if (maximize_button()->IsVisible() && 206 if (maximize_button()->IsVisible() &&
207 maximize_button()->GetMirroredBounds().Contains(point)) 207 maximize_button()->GetMirroredBounds().Contains(point))
208 return true; 208 return true;
209 if (minimize_button()->IsVisible() && 209 if (minimize_button()->IsVisible() &&
210 minimize_button()->GetMirroredBounds().Contains(point)) 210 minimize_button()->GetMirroredBounds().Contains(point))
211 return true; 211 return true;
212 212
213 return false; 213 return false;
214 } 214 }
215 215
216 void TouchBrowserFrameView::TabSelectedAt(TabContentsWrapper* old_contents, 216 void TouchBrowserFrameView::TabActivatedAt(TabContentsWrapper* old_contents,
217 TabContentsWrapper* new_contents, 217 TabContentsWrapper* new_contents,
218 int index, 218 int index,
219 bool user_gesture) { 219 bool user_gesture) {
220 if (new_contents == old_contents) 220 if (new_contents == old_contents)
221 return; 221 return;
222 222
223 TabContents* contents = new_contents->tab_contents(); 223 TabContents* contents = new_contents->tab_contents();
224 if (!TabContentsHasFocus(contents)) 224 if (!TabContentsHasFocus(contents))
225 return; 225 return;
226 226
227 bool* editable = GetFocusedStateAccessor()->GetProperty( 227 bool* editable = GetFocusedStateAccessor()->GetProperty(
228 contents->property_bag()); 228 contents->property_bag());
229 UpdateKeyboardAndLayout(editable ? *editable : false); 229 UpdateKeyboardAndLayout(editable ? *editable : false);
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 parent()->Layout(); 297 parent()->Layout();
298 298
299 // The keyboard that pops up may end up hiding the text entry. So make sure 299 // The keyboard that pops up may end up hiding the text entry. So make sure
300 // the renderer scrolls when necessary to keep the textfield visible. 300 // the renderer scrolls when necessary to keep the textfield visible.
301 RenderViewHost* host = 301 RenderViewHost* host =
302 browser_view()->browser()->GetSelectedTabContents()->render_view_host(); 302 browser_view()->browser()->GetSelectedTabContents()->render_view_host();
303 host->ScrollFocusedEditableNodeIntoView(); 303 host->ScrollFocusedEditableNodeIntoView();
304 } 304 }
305 SchedulePaint(); 305 SchedulePaint();
306 } 306 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698