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

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

Issue 10837215: exhibit 1: explicit null checks Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 4 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/location_bar_view_gtk.h" 5 #include "chrome/browser/ui/gtk/location_bar_view_gtk.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 798 matching lines...) Expand 10 before | Expand all | Expand 10 after
809 content::NotificationService::current()->Notify( 809 content::NotificationService::current()->Notify(
810 chrome::NOTIFICATION_ACCESSIBILITY_CONTROL_FOCUSED, 810 chrome::NOTIFICATION_ACCESSIBILITY_CONTROL_FOCUSED,
811 content::Source<Profile>(profile), 811 content::Source<Profile>(profile),
812 content::Details<AccessibilityTextBoxInfo>(&info)); 812 content::Details<AccessibilityTextBoxInfo>(&info));
813 813
814 // Update the keyword and search hint states. 814 // Update the keyword and search hint states.
815 OnChanged(); 815 OnChanged();
816 } 816 }
817 817
818 SkBitmap LocationBarViewGtk::GetFavicon() const { 818 SkBitmap LocationBarViewGtk::GetFavicon() const {
819 return GetTabContents()->favicon_tab_helper()->GetFavicon().AsBitmap(); 819 const gfx::Image& icon = GetTabContents()->favicon_tab_helper()->GetFavicon();
820 return icon.IsEmpty() ? SkBitmap() : *icon.ToSkBitmap();
820 } 821 }
821 822
822 string16 LocationBarViewGtk::GetTitle() const { 823 string16 LocationBarViewGtk::GetTitle() const {
823 return GetWebContents()->GetTitle(); 824 return GetWebContents()->GetTitle();
824 } 825 }
825 826
826 InstantController* LocationBarViewGtk::GetInstant() { 827 InstantController* LocationBarViewGtk::GetInstant() {
827 return browser_->instant_controller()->instant(); 828 return browser_->instant_controller()->instant();
828 } 829 }
829 830
(...skipping 1222 matching lines...) Expand 10 before | Expand all | Expand 10 after
2052 } 2053 }
2053 2054
2054 void LocationBarViewGtk::PageActionViewGtk::InspectPopup( 2055 void LocationBarViewGtk::PageActionViewGtk::InspectPopup(
2055 ExtensionAction* action) { 2056 ExtensionAction* action) {
2056 ExtensionPopupGtk::Show( 2057 ExtensionPopupGtk::Show(
2057 action->GetPopupUrl(current_tab_id_), 2058 action->GetPopupUrl(current_tab_id_),
2058 owner_->browser_, 2059 owner_->browser_,
2059 event_box_.get(), 2060 event_box_.get(),
2060 ExtensionPopupGtk::SHOW_AND_INSPECT); 2061 ExtensionPopupGtk::SHOW_AND_INSPECT);
2061 } 2062 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/hung_renderer_dialog_gtk.cc ('k') | chrome/browser/ui/gtk/tabs/tab_renderer_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698