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

Side by Side Diff: chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm

Issue 10834368: Convert mostly favicon related code from SkBitmap to ImageSkia and Image (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 #import "chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h" 5 #import "chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 #include "chrome/common/extensions/extension_action.h" 56 #include "chrome/common/extensions/extension_action.h"
57 #include "chrome/common/extensions/extension_resource.h" 57 #include "chrome/common/extensions/extension_resource.h"
58 #include "chrome/common/extensions/extension_switch_utils.h" 58 #include "chrome/common/extensions/extension_switch_utils.h"
59 #include "chrome/common/pref_names.h" 59 #include "chrome/common/pref_names.h"
60 #include "content/public/browser/notification_service.h" 60 #include "content/public/browser/notification_service.h"
61 #include "content/public/browser/web_contents.h" 61 #include "content/public/browser/web_contents.h"
62 #include "grit/generated_resources.h" 62 #include "grit/generated_resources.h"
63 #include "grit/theme_resources.h" 63 #include "grit/theme_resources.h"
64 #include "net/base/net_util.h" 64 #include "net/base/net_util.h"
65 #include "skia/ext/skia_utils_mac.h" 65 #include "skia/ext/skia_utils_mac.h"
66 #include "third_party/skia/include/core/SkBitmap.h" 66 #include "third_party/skia/include/core/SkBitmap.h"
Nico 2012/08/16 20:26:27 can this go?
pkotwicz 2012/08/16 21:32:31 SkBitmap is still used by LocationBarViewMac::GetK
Nico 2012/08/16 21:35:06 But only in reference form, so the definition shou
67 #include "ui/base/l10n/l10n_util_mac.h" 67 #include "ui/base/l10n/l10n_util_mac.h"
68 #include "ui/base/resource/resource_bundle.h" 68 #include "ui/base/resource/resource_bundle.h"
69 #include "ui/gfx/image/image.h"
69 70
70 using content::WebContents; 71 using content::WebContents;
71 72
72 namespace { 73 namespace {
73 74
74 // Vertical space between the bottom edge of the location_bar and the first run 75 // Vertical space between the bottom edge of the location_bar and the first run
75 // bubble arrow point. 76 // bubble arrow point.
76 const static int kFirstRunBubbleYOffset = 1; 77 const static int kFirstRunBubbleYOffset = 1;
77 78
78 } 79 }
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 311
311 void LocationBarViewMac::OnSetFocus() { 312 void LocationBarViewMac::OnSetFocus() {
312 // Update the keyword and search hint states. 313 // Update the keyword and search hint states.
313 OnChanged(); 314 OnChanged();
314 } 315 }
315 316
316 void LocationBarViewMac::OnKillFocus() { 317 void LocationBarViewMac::OnKillFocus() {
317 // Do nothing. 318 // Do nothing.
318 } 319 }
319 320
320 SkBitmap LocationBarViewMac::GetFavicon() const { 321 gfx::Image LocationBarViewMac::GetFavicon() const {
321 return browser_->GetCurrentPageIcon(); 322 return browser_->GetCurrentPageIcon();
322 } 323 }
323 324
324 string16 LocationBarViewMac::GetTitle() const { 325 string16 LocationBarViewMac::GetTitle() const {
325 return browser_->GetWindowTitleForCurrentTab(); 326 return browser_->GetWindowTitleForCurrentTab();
326 } 327 }
327 328
328 InstantController* LocationBarViewMac::GetInstant() { 329 InstantController* LocationBarViewMac::GetInstant() {
329 return browser_->instant_controller()->instant(); 330 return browser_->instant_controller()->instant();
330 } 331 }
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
727 void LocationBarViewMac::UpdateChromeToMobileEnabled() { 728 void LocationBarViewMac::UpdateChromeToMobileEnabled() {
728 if (!chrome_to_mobile_decoration_.get()) 729 if (!chrome_to_mobile_decoration_.get())
729 return; 730 return;
730 731
731 DCHECK(ChromeToMobileService::IsChromeToMobileEnabled()); 732 DCHECK(ChromeToMobileService::IsChromeToMobileEnabled());
732 bool enabled = [field_ isEditable] && !toolbar_model_->input_in_progress() && 733 bool enabled = [field_ isEditable] && !toolbar_model_->input_in_progress() &&
733 ChromeToMobileServiceFactory::GetForProfile(profile_)->HasMobiles(); 734 ChromeToMobileServiceFactory::GetForProfile(profile_)->HasMobiles();
734 chrome_to_mobile_decoration_->SetVisible(enabled); 735 chrome_to_mobile_decoration_->SetVisible(enabled);
735 command_updater_->UpdateCommandEnabled(IDC_CHROME_TO_MOBILE_PAGE, enabled); 736 command_updater_->UpdateCommandEnabled(IDC_CHROME_TO_MOBILE_PAGE, enabled);
736 } 737 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698