summaryrefslogtreecommitdiffstats
path: root/chrome/browser/title_chomper.h
blob: 621da9767ba2a46bb961c93b63883501ab487ebf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CHROME_BROWSER_TITLE_CHOMPER_H__
#define CHROME_BROWSER_TITLE_CHOMPER_H__

#include <string>
#include <vector>

class TitleChomper {
 public:
  TitleChomper();

  void AddTitle(const std::wstring& title);

  void ChompTitles(std::vector<std::wstring>* chomped_titles);

 private:
  void GenerateChompedTitle(const std::wstring& title,
                            std::wstring* chomped_title);

 private:
  std::vector<std::wstring> titles_;
  std::vector<std::wstring> last_words_;
  std::wstring last_title_;
};

#endif  // #ifndef CHROME_BROWSER_TITLE_CHOMPER_H__