diff options
author | beng@google.com <beng@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-09 00:38:19 +0000 |
---|---|---|
committer | beng@google.com <beng@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-09 00:38:19 +0000 |
commit | b519281d42b82e787e4ba0cb31f3d6cc91c954d3 (patch) | |
tree | fb077507c27d1b35b46e14ae99cd5edfe1195e20 /chrome/browser/tabs | |
parent | 3cde1db6f69ce6c03e752cc86bbadf9379259fb2 (diff) | |
download | chromium_src-b519281d42b82e787e4ba0cb31f3d6cc91c954d3.zip chromium_src-b519281d42b82e787e4ba0cb31f3d6cc91c954d3.tar.gz chromium_src-b519281d42b82e787e4ba0cb31f3d6cc91c954d3.tar.bz2 |
Even more tweaks.
- make window icon and title work on app windows
- make window title updating sync with the task bar
- make Aero Glass frame respect app mode settings
- move title formatting routine from TabRenderer into Browser (a more central location)
- appearance adjustments for app windows with info bars
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@612 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/tabs')
-rw-r--r-- | chrome/browser/tabs/tab_renderer.cc | 14 | ||||
-rw-r--r-- | chrome/browser/tabs/tab_renderer.h | 4 |
2 files changed, 2 insertions, 16 deletions
diff --git a/chrome/browser/tabs/tab_renderer.cc b/chrome/browser/tabs/tab_renderer.cc index 6f7030d..05b2a61 100644 --- a/chrome/browser/tabs/tab_renderer.cc +++ b/chrome/browser/tabs/tab_renderer.cc @@ -33,6 +33,7 @@ #include "base/gfx/image_operations.h" #include "chrome/app/theme/theme_resources.h" +#include "chrome/browser/browser.h" #include "chrome/browser/tabs/tab_strip_model.h" #include "chrome/browser/tab_contents.h" #include "chrome/common/gfx/chrome_canvas.h" @@ -379,17 +380,6 @@ gfx::Size TabRenderer::GetStandardSize() { return standard_size; } -// static -void TabRenderer::FormatTitleForDisplay(std::wstring* title) { - size_t current_index = 0; - size_t match_index; - while ((match_index = title->find(L'\n', current_index)) != - std::wstring::npos) { - title->replace(match_index, 1, L""); - current_index = match_index; - } -} - //////////////////////////////////////////////////////////////////////////////// // TabRenderer, protected: @@ -462,7 +452,7 @@ void TabRenderer::Paint(ChromeCanvas* canvas) { title = l10n_util::GetString(IDS_TAB_UNTITLED_TITLE); } } else { - FormatTitleForDisplay(&title); + Browser::FormatTitleForDisplay(&title); } SkColor title_color = IsSelected() ? kSelectedTitleColor diff --git a/chrome/browser/tabs/tab_renderer.h b/chrome/browser/tabs/tab_renderer.h index 2c7ad58..625a0ed 100644 --- a/chrome/browser/tabs/tab_renderer.h +++ b/chrome/browser/tabs/tab_renderer.h @@ -88,10 +88,6 @@ class TabRenderer : public ChromeViews::View, // available. static gfx::Size GetStandardSize(); - // Remove invalid characters from the title (e.g. newlines) that may - // interfere with rendering. - static void FormatTitleForDisplay(std::wstring* title); - protected: ChromeViews::Button* close_button() const { return close_button_; } const gfx::Rect& title_bounds() const { return title_bounds_; } |