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

Side by Side Diff: chrome/browser/ui/gtk/tabs/tab_strip_gtk.cc

Issue 6995032: Fix a browser crash involving omnibox extension keywords. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: latest 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/gtk/gtk_util.cc ('k') | chrome/browser/ui/views/frame/browser_root_view.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/tabs/tab_strip_gtk.h" 5 #include "chrome/browser/ui/gtk/tabs/tab_strip_gtk.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/i18n/rtl.h" 9 #include "base/i18n/rtl.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 1631 matching lines...) Expand 10 before | Expand all | Expand 10 after
1642 // Destroy the drop indicator. 1642 // Destroy the drop indicator.
1643 drop_info_.reset(); 1643 drop_info_.reset();
1644 1644
1645 // Cancel any pending tab transition. 1645 // Cancel any pending tab transition.
1646 hover_tab_selector_.CancelTabTransition(); 1646 hover_tab_selector_.CancelTabTransition();
1647 1647
1648 GURL url; 1648 GURL url;
1649 if (is_plain_text) { 1649 if (is_plain_text) {
1650 AutocompleteMatch match; 1650 AutocompleteMatch match;
1651 model_->profile()->GetAutocompleteClassifier()->Classify( 1651 model_->profile()->GetAutocompleteClassifier()->Classify(
1652 UTF8ToUTF16(reinterpret_cast<char*>(data)), string16(), false, 1652 UTF8ToUTF16(reinterpret_cast<char*>(data)), string16(), false, false,
1653 &match, NULL); 1653 &match, NULL);
1654 url = match.destination_url; 1654 url = match.destination_url;
1655 } else { 1655 } else {
1656 std::string url_string(reinterpret_cast<char*>(data)); 1656 std::string url_string(reinterpret_cast<char*>(data));
1657 url = GURL(url_string.substr(0, url_string.find_first_of('\n'))); 1657 url = GURL(url_string.substr(0, url_string.find_first_of('\n')));
1658 } 1658 }
1659 if (!url.is_valid()) 1659 if (!url.is_valid())
1660 return false; 1660 return false;
1661 1661
1662 browser::NavigateParams params(window()->browser(), url, 1662 browser::NavigateParams params(window()->browser(), url,
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after
2076 2076
2077 // Let the middle mouse button initiate clicks as well. 2077 // Let the middle mouse button initiate clicks as well.
2078 gtk_util::SetButtonTriggersNavigation(button->widget()); 2078 gtk_util::SetButtonTriggersNavigation(button->widget());
2079 g_signal_connect(button->widget(), "clicked", 2079 g_signal_connect(button->widget(), "clicked",
2080 G_CALLBACK(OnNewTabClickedThunk), this); 2080 G_CALLBACK(OnNewTabClickedThunk), this);
2081 GTK_WIDGET_UNSET_FLAGS(button->widget(), GTK_CAN_FOCUS); 2081 GTK_WIDGET_UNSET_FLAGS(button->widget(), GTK_CAN_FOCUS);
2082 gtk_fixed_put(GTK_FIXED(tabstrip_.get()), button->widget(), 0, 0); 2082 gtk_fixed_put(GTK_FIXED(tabstrip_.get()), button->widget(), 0, 0);
2083 2083
2084 return button; 2084 return button;
2085 } 2085 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/gtk_util.cc ('k') | chrome/browser/ui/views/frame/browser_root_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698