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

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

Issue 933893003: Use standard icon/title in global error bubble (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
« no previous file with comments | « no previous file | chrome/browser/ui/views/frame/opaque_browser_frame_view.cc » ('j') | 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) 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/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "chrome/app/chrome_command_ids.h" 10 #include "chrome/app/chrome_command_ids.h"
(...skipping 754 matching lines...) Expand 10 before | Expand all | Expand 10 after
765 FormatTitleForDisplay(&title); 765 FormatTitleForDisplay(&title);
766 } 766 }
767 767
768 if (title.empty()) 768 if (title.empty())
769 title = base::UTF8ToUTF16(app_name()); 769 title = base::UTF8ToUTF16(app_name());
770 770
771 return title; 771 return title;
772 } 772 }
773 773
774 gfx::Image Panel::GetCurrentPageIcon() const { 774 gfx::Image Panel::GetCurrentPageIcon() const {
775 return panel_host_->GetPageIcon(); 775 return panel_host_.get() ? panel_host_->GetPageIcon() : gfx::Image();
776 } 776 }
777 777
778 void Panel::UpdateTitleBar() { 778 void Panel::UpdateTitleBar() {
779 native_panel_->UpdatePanelTitleBar(); 779 native_panel_->UpdatePanelTitleBar();
780 } 780 }
781 781
782 void Panel::LoadingStateChanged(bool is_loading) { 782 void Panel::LoadingStateChanged(bool is_loading) {
783 command_updater_.UpdateCommandEnabled(IDC_STOP, is_loading); 783 command_updater_.UpdateCommandEnabled(IDC_STOP, is_loading);
784 native_panel_->UpdatePanelLoadingAnimations(is_loading); 784 native_panel_->UpdatePanelLoadingAnimations(is_loading);
785 UpdateTitleBar(); 785 UpdateTitleBar();
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
900 // static 900 // static
901 void Panel::FormatTitleForDisplay(base::string16* title) { 901 void Panel::FormatTitleForDisplay(base::string16* title) {
902 size_t current_index = 0; 902 size_t current_index = 0;
903 size_t match_index; 903 size_t match_index;
904 while ((match_index = title->find(L'\n', current_index)) != 904 while ((match_index = title->find(L'\n', current_index)) !=
905 base::string16::npos) { 905 base::string16::npos) {
906 title->replace(match_index, 1, base::string16()); 906 title->replace(match_index, 1, base::string16());
907 current_index = match_index; 907 current_index = match_index;
908 } 908 }
909 } 909 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/views/frame/opaque_browser_frame_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698