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

Side by Side Diff: chrome/browser/gtk/location_bar_view_gtk.cc

Issue 182004: GTK Themes: Refresh the entire location bar area on Update(). (Closed)
Patch Set: Doing it a different way. 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/gtk/location_bar_view_gtk.h" 5 #include "chrome/browser/gtk/location_bar_view_gtk.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "app/l10n_util.h" 9 #include "app/l10n_util.h"
10 #include "app/resource_bundle.h" 10 #include "app/resource_bundle.h"
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 261
262 void LocationBarViewGtk::SetProfile(Profile* profile) { 262 void LocationBarViewGtk::SetProfile(Profile* profile) {
263 profile_ = profile; 263 profile_ = profile;
264 } 264 }
265 265
266 void LocationBarViewGtk::Update(const TabContents* contents) { 266 void LocationBarViewGtk::Update(const TabContents* contents) {
267 SetSecurityIcon(toolbar_model_->GetIcon()); 267 SetSecurityIcon(toolbar_model_->GetIcon());
268 SetInfoText(); 268 SetInfoText();
269 location_entry_->Update(contents); 269 location_entry_->Update(contents);
270 // The security level (background color) could have changed, etc. 270 // The security level (background color) could have changed, etc.
271 gtk_widget_queue_draw(hbox_.get()); 271 if (theme_provider_->UseGtkTheme()) {
272 // In GTK mode, we need our parent to redraw, as it draws the text entry
273 // border.
274 gtk_widget_queue_draw(widget()->parent);
275 } else {
276 gtk_widget_queue_draw(widget());
277 }
272 } 278 }
273 279
274 void LocationBarViewGtk::OnAutocompleteAccept(const GURL& url, 280 void LocationBarViewGtk::OnAutocompleteAccept(const GURL& url,
275 WindowOpenDisposition disposition, 281 WindowOpenDisposition disposition,
276 PageTransition::Type transition, 282 PageTransition::Type transition,
277 const GURL& alternate_nav_url) { 283 const GURL& alternate_nav_url) {
278 if (!url.is_valid()) 284 if (!url.is_valid())
279 return; 285 return;
280 286
281 location_input_ = UTF8ToWide(url.spec()); 287 location_input_ = UTF8ToWide(url.spec());
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
611 LocationBarViewGtk* location_bar) { 617 LocationBarViewGtk* location_bar) {
612 TabContents* tab = BrowserList::GetLastActive()->GetSelectedTabContents(); 618 TabContents* tab = BrowserList::GetLastActive()->GetSelectedTabContents();
613 NavigationEntry* nav_entry = tab->controller().GetActiveEntry(); 619 NavigationEntry* nav_entry = tab->controller().GetActiveEntry();
614 if (!nav_entry) { 620 if (!nav_entry) {
615 NOTREACHED(); 621 NOTREACHED();
616 return true; 622 return true;
617 } 623 }
618 tab->ShowPageInfo(nav_entry->url(), nav_entry->ssl(), true); 624 tab->ShowPageInfo(nav_entry->url(), nav_entry->ssl(), true);
619 return true; 625 return true;
620 } 626 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698