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

Side by Side Diff: chrome/browser/ui/gtk/browser_toolbar_gtk.cc

Issue 7049004: Normalize chrome://foo/ trailing slashes, ChromeURLHostEquals comparison, RIP dead consts. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove stdlib.h include. 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
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | chrome/browser/ui/webui/BidiCheckerWebUITest.cc » ('j') | 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) 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/gtk/browser_toolbar_gtk.h" 5 #include "chrome/browser/ui/gtk/browser_toolbar_gtk.h"
6 6
7 #include <X11/XF86keysym.h> 7 #include <X11/XF86keysym.h>
8 #include <gdk/gdkkeysyms.h> 8 #include <gdk/gdkkeysyms.h>
9 #include <gtk/gtk.h> 9 #include <gtk/gtk.h>
10 10
(...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after
599 GtkSelectionData* data, guint info, guint time) { 599 GtkSelectionData* data, guint info, guint time) {
600 if (info != ui::TEXT_PLAIN) { 600 if (info != ui::TEXT_PLAIN) {
601 NOTIMPLEMENTED() << "Only support plain text drops for now, sorry!"; 601 NOTIMPLEMENTED() << "Only support plain text drops for now, sorry!";
602 return; 602 return;
603 } 603 }
604 604
605 GURL url(reinterpret_cast<char*>(data->data)); 605 GURL url(reinterpret_cast<char*>(data->data));
606 if (!url.is_valid()) 606 if (!url.is_valid())
607 return; 607 return;
608 608
609 bool url_is_newtab = url.spec() == chrome::kChromeUINewTabURL; 609 bool url_is_newtab = url == GURL(chrome::kChromeUINewTabURL);
Evan Stade 2011/05/20 05:18:43 sorry, I guess I was unclear during our chat. I co
msw 2011/05/22 01:12:12 Done.
610 home_page_is_new_tab_page_.SetValue(url_is_newtab); 610 home_page_is_new_tab_page_.SetValue(url_is_newtab);
611 if (!url_is_newtab) 611 if (!url_is_newtab)
612 home_page_.SetValue(url.spec()); 612 home_page_.SetValue(url.spec());
613 } 613 }
614 614
615 void BrowserToolbarGtk::NotifyPrefChanged(const std::string* pref) { 615 void BrowserToolbarGtk::NotifyPrefChanged(const std::string* pref) {
616 if (!pref || *pref == prefs::kShowHomeButton) { 616 if (!pref || *pref == prefs::kShowHomeButton) {
617 if (show_home_button_.GetValue() && !ShouldOnlyShowLocation()) { 617 if (show_home_button_.GetValue() && !ShouldOnlyShowLocation()) {
618 gtk_widget_show(home_->widget()); 618 gtk_widget_show(home_->widget());
619 } else { 619 } else {
(...skipping 29 matching lines...) Expand all
649 int x_offset = base::i18n::IsRTL() ? 0 : 649 int x_offset = base::i18n::IsRTL() ? 0 :
650 sender->allocation.width - badge->width(); 650 sender->allocation.width - badge->width();
651 int y_offset = 0; 651 int y_offset = 0;
652 canvas.DrawBitmapInt( 652 canvas.DrawBitmapInt(
653 *badge, 653 *badge,
654 sender->allocation.x + x_offset, 654 sender->allocation.x + x_offset,
655 sender->allocation.y + y_offset); 655 sender->allocation.y + y_offset);
656 656
657 return FALSE; 657 return FALSE;
658 } 658 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | chrome/browser/ui/webui/BidiCheckerWebUITest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698