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

Side by Side Diff: chrome/browser/views/location_bar_view.cc

Issue 194041: Making the focus remembering across tab switch work. (Closed)
Patch Set: Fix for conflicts 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
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/views/location_bar_view.h" 5 #include "chrome/browser/views/location_bar_view.h"
6 6
7 #if defined(OS_LINUX) 7 #if defined(OS_LINUX)
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 #endif 9 #endif
10 10
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 282
283 Layout(); 283 Layout();
284 SchedulePaint(); 284 SchedulePaint();
285 } 285 }
286 286
287 void LocationBarView::InvalidatePageActions() { 287 void LocationBarView::InvalidatePageActions() {
288 DeletePageActionViews(); 288 DeletePageActionViews();
289 } 289 }
290 290
291 void LocationBarView::Focus() { 291 void LocationBarView::Focus() {
292 #if defined(OS_WIN) 292 // Focus the location entry native view.
293 ::SetFocus(location_entry_->m_hWnd); 293 location_entry_->SetFocus();
294 #else
295 gtk_widget_grab_focus(location_entry_->widget());
296 #endif
297 } 294 }
298 295
299 void LocationBarView::SetProfile(Profile* profile) { 296 void LocationBarView::SetProfile(Profile* profile) {
300 DCHECK(profile); 297 DCHECK(profile);
301 if (profile_ != profile) { 298 if (profile_ != profile) {
302 profile_ = profile; 299 profile_ = profile;
303 location_entry_->model()->SetProfile(profile); 300 location_entry_->model()->SetProfile(profile);
304 selected_keyword_view_.set_profile(profile); 301 selected_keyword_view_.set_profile(profile);
305 keyword_hint_view_.set_profile(profile); 302 keyword_hint_view_.set_profile(profile);
306 security_image_view_.set_profile(profile); 303 security_image_view_.set_profile(profile);
(...skipping 1014 matching lines...) Expand 10 before | Expand all | Expand 10 after
1321 } 1318 }
1322 1319
1323 int LocationBarView::PageActionVisibleCount() { 1320 int LocationBarView::PageActionVisibleCount() {
1324 int result = 0; 1321 int result = 0;
1325 for (size_t i = 0; i < page_action_image_views_.size(); i++) { 1322 for (size_t i = 0; i < page_action_image_views_.size(); i++) {
1326 if (page_action_image_views_[i]->IsVisible()) 1323 if (page_action_image_views_[i]->IsVisible())
1327 ++result; 1324 ++result;
1328 } 1325 }
1329 return result; 1326 return result;
1330 } 1327 }
OLDNEW
« no previous file with comments | « chrome/browser/views/frame/browser_frame_gtk.cc ('k') | chrome/browser/views/tab_contents/native_tab_contents_container_gtk.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698