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

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: applied change to panel_titlebar_gtk.cc after syncing 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 698 matching lines...) Expand 10 before | Expand all | Expand 10 after
743 // static 743 // static
744 void Panel::FormatTitleForDisplay(string16* title) { 744 void Panel::FormatTitleForDisplay(string16* title) {
745 size_t current_index = 0; 745 size_t current_index = 0;
746 size_t match_index; 746 size_t match_index;
747 while ((match_index = title->find(L'\n', current_index)) != string16::npos) { 747 while ((match_index = title->find(L'\n', current_index)) != string16::npos) {
748 title->replace(match_index, 1, string16()); 748 title->replace(match_index, 1, string16());
749 current_index = match_index; 749 current_index = match_index;
750 } 750 }
751 } 751 }
752 752
753 SkBitmap Panel::GetCurrentPageIcon() const { 753 gfx::Image Panel::GetCurrentPageIcon() const {
754 return panel_host_->GetPageIcon(); 754 return panel_host_->GetPageIcon();
755 } 755 }
756 756
757 void Panel::UpdateTitleBar() { 757 void Panel::UpdateTitleBar() {
758 native_panel_->UpdatePanelTitleBar(); 758 native_panel_->UpdatePanelTitleBar();
759 } 759 }
760 760
761 void Panel::LoadingStateChanged(bool is_loading) { 761 void Panel::LoadingStateChanged(bool is_loading) {
762 command_updater_.UpdateCommandEnabled(IDC_STOP, is_loading); 762 command_updater_.UpdateCommandEnabled(IDC_STOP, is_loading);
763 native_panel_->UpdatePanelLoadingAnimations(is_loading); 763 native_panel_->UpdatePanelLoadingAnimations(is_loading);
764 UpdateTitleBar(); 764 UpdateTitleBar();
765 } 765 }
766 766
767 void Panel::WebContentsFocused(content::WebContents* contents) { 767 void Panel::WebContentsFocused(content::WebContents* contents) {
768 native_panel_->PanelWebContentsFocused(contents); 768 native_panel_->PanelWebContentsFocused(contents);
769 } 769 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/panels/panel.h ('k') | chrome/browser/ui/panels/panel_browser_titlebar_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698