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

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

Issue 7033048: Multi-tab: Adding new Notification when tab selection changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressing comments. Created 9 years, 6 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 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
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::ActiveTabChanged(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)
225 return;
226
227 TabContents* contents = new_contents->tab_contents(); 224 TabContents* contents = new_contents->tab_contents();
228 if (!TabContentsHasFocus(contents)) 225 if (!TabContentsHasFocus(contents))
229 return; 226 return;
230 227
231 bool* editable = GetFocusedStateAccessor()->GetProperty( 228 bool* editable = GetFocusedStateAccessor()->GetProperty(
232 contents->property_bag()); 229 contents->property_bag());
233 UpdateKeyboardAndLayout(editable ? *editable : false); 230 UpdateKeyboardAndLayout(editable ? *editable : false);
234 } 231 }
235 232
236 233
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 307
311 // The keyboard that pops up may end up hiding the text entry. So make sure 308 // 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. 309 // the renderer scrolls when necessary to keep the textfield visible.
313 RenderViewHost* host = 310 RenderViewHost* host =
314 browser_view()->browser()->GetSelectedTabContents()->render_view_host(); 311 browser_view()->browser()->GetSelectedTabContents()->render_view_host();
315 host->Send(new ViewMsg_ScrollFocusedEditableNodeIntoView( 312 host->Send(new ViewMsg_ScrollFocusedEditableNodeIntoView(
316 host->routing_id())); 313 host->routing_id()));
317 } 314 }
318 SchedulePaint(); 315 SchedulePaint();
319 } 316 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698