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

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

Issue 20381: Fix crasher in GetDefaultSearchEngineName() in first run bubble.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 10 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/views/first_run_bubble.cc ('k') | 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 #include "base/path_service.h" 7 #include "base/path_service.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "chrome/app/chrome_dll_resource.h" 9 #include "chrome/app/chrome_dll_resource.h"
10 #include "grit/theme_resources.h" 10 #include "grit/theme_resources.h"
(...skipping 817 matching lines...) Expand 10 before | Expand all | Expand 10 after
828 828
829 // We try to guess that 20 pixels offset is a good place for the first 829 // We try to guess that 20 pixels offset is a good place for the first
830 // letter in the OmniBox. 830 // letter in the OmniBox.
831 gfx::Rect bounds(location.x(), location.y(), 20, height()); 831 gfx::Rect bounds(location.x(), location.y(), 20, height());
832 832
833 // Moving the bounds "backwards" so that it appears within the location bar 833 // Moving the bounds "backwards" so that it appears within the location bar
834 // if the UI layout is RTL. 834 // if the UI layout is RTL.
835 if (UILayoutIsRightToLeft()) 835 if (UILayoutIsRightToLeft())
836 bounds.set_x(location.x() - 20); 836 bounds.set_x(location.x() - 20);
837 837
838 FirstRunBubble::Show( 838 FirstRunBubble::Show(profile_,
839 location_entry_view_->GetRootView()->GetWidget()->GetHWND(), 839 location_entry_view_->GetRootView()->GetWidget()->GetHWND(),
840 bounds); 840 bounds);
841 } 841 }
842 842
843 // SecurityImageView------------------------------------------------------------ 843 // SecurityImageView------------------------------------------------------------
844 844
845 // static 845 // static
846 SkBitmap* LocationBarView::SecurityImageView::lock_icon_ = NULL; 846 SkBitmap* LocationBarView::SecurityImageView::lock_icon_ = NULL;
847 SkBitmap* LocationBarView::SecurityImageView::warning_icon_ = NULL; 847 SkBitmap* LocationBarView::SecurityImageView::warning_icon_ = NULL;
848 848
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
994 } 994 }
995 995
996 void LocationBarView::FocusSearch() { 996 void LocationBarView::FocusSearch() {
997 location_entry_->SetUserText(L"?"); 997 location_entry_->SetUserText(L"?");
998 location_entry_->SetFocus(); 998 location_entry_->SetFocus();
999 } 999 }
1000 1000
1001 void LocationBarView::SaveStateToContents(TabContents* contents) { 1001 void LocationBarView::SaveStateToContents(TabContents* contents) {
1002 location_entry_->SaveStateToTab(contents); 1002 location_entry_->SaveStateToTab(contents);
1003 } 1003 }
OLDNEW
« no previous file with comments | « chrome/browser/views/first_run_bubble.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698