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

Side by Side Diff: chrome/browser/ui/panels/panel.cc

Issue 10827259: Change panels to use gfx::Image instead of SkBitmap for favicon. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: compile fix 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/panels/panel.h" 5 #include "chrome/browser/ui/panels/panel.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/app/chrome_command_ids.h" 10 #include "chrome/app/chrome_command_ids.h"
(...skipping 13 matching lines...) Expand all
24 #include "chrome/browser/ui/panels/panel_strip.h" 24 #include "chrome/browser/ui/panels/panel_strip.h"
25 #include "chrome/browser/web_applications/web_app.h" 25 #include "chrome/browser/web_applications/web_app.h"
26 #include "chrome/common/chrome_notification_types.h" 26 #include "chrome/common/chrome_notification_types.h"
27 #include "chrome/common/extensions/extension.h" 27 #include "chrome/common/extensions/extension.h"
28 #include "content/public/browser/notification_service.h" 28 #include "content/public/browser/notification_service.h"
29 #include "content/public/browser/notification_source.h" 29 #include "content/public/browser/notification_source.h"
30 #include "content/public/browser/notification_types.h" 30 #include "content/public/browser/notification_types.h"
31 #include "content/public/browser/render_view_host.h" 31 #include "content/public/browser/render_view_host.h"
32 #include "content/public/browser/user_metrics.h" 32 #include "content/public/browser/user_metrics.h"
33 #include "content/public/browser/web_contents.h" 33 #include "content/public/browser/web_contents.h"
34 #include "third_party/skia/include/core/SkBitmap.h" 34 #include "ui/gfx/image/image.h"
35 #include "ui/gfx/rect.h" 35 #include "ui/gfx/rect.h"
36 36
37 using content::RenderViewHost; 37 using content::RenderViewHost;
38 using content::UserMetricsAction; 38 using content::UserMetricsAction;
39 39
40 namespace panel_internal { 40 namespace panel_internal {
41 41
42 class PanelExtensionWindowController : public extensions::WindowController { 42 class PanelExtensionWindowController : public extensions::WindowController {
43 public: 43 public:
44 PanelExtensionWindowController(Panel* panel, Profile* profile); 44 PanelExtensionWindowController(Panel* panel, Profile* profile);
(...skipping 689 matching lines...) Expand 10 before | Expand all | Expand 10 after
734 // static 734 // static
735 void Panel::FormatTitleForDisplay(string16* title) { 735 void Panel::FormatTitleForDisplay(string16* title) {
736 size_t current_index = 0; 736 size_t current_index = 0;
737 size_t match_index; 737 size_t match_index;
738 while ((match_index = title->find(L'\n', current_index)) != string16::npos) { 738 while ((match_index = title->find(L'\n', current_index)) != string16::npos) {
739 title->replace(match_index, 1, string16()); 739 title->replace(match_index, 1, string16());
740 current_index = match_index; 740 current_index = match_index;
741 } 741 }
742 } 742 }
743 743
744 SkBitmap Panel::GetCurrentPageIcon() const { 744 gfx::Image Panel::GetCurrentPageIcon() const {
745 return panel_host_->GetPageIcon(); 745 return panel_host_->GetPageIcon();
746 } 746 }
747 747
748 void Panel::UpdateTitleBar() { 748 void Panel::UpdateTitleBar() {
749 native_panel_->UpdatePanelTitleBar(); 749 native_panel_->UpdatePanelTitleBar();
750 } 750 }
751 751
752 void Panel::LoadingStateChanged(bool is_loading) { 752 void Panel::LoadingStateChanged(bool is_loading) {
753 command_updater_.UpdateCommandEnabled(IDC_STOP, is_loading); 753 command_updater_.UpdateCommandEnabled(IDC_STOP, is_loading);
754 native_panel_->UpdatePanelLoadingAnimations(is_loading); 754 native_panel_->UpdatePanelLoadingAnimations(is_loading);
755 UpdateTitleBar(); 755 UpdateTitleBar();
756 } 756 }
757 757
758 void Panel::WebContentsFocused(content::WebContents* contents) { 758 void Panel::WebContentsFocused(content::WebContents* contents) {
759 native_panel_->PanelWebContentsFocused(contents); 759 native_panel_->PanelWebContentsFocused(contents);
760 } 760 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698