summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views/options/fonts_languages_window_view.h
blob: 0ddc3d5abab7a8ae2a5d64377c2300d14511f249 (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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
// 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_FONTS_LANGUAGE_WINDOW_H__
#define CHROME_BROWSER_FONTS_LANGUAGE_WINDOW_H__

#include "chrome/views/tabbed_pane.h"
#include "chrome/views/view.h"
#include "chrome/views/window/dialog_delegate.h"
#include "chrome/views/window/window.h"

class Profile;
class FontsPageView;
class LanguagesPageView;

///////////////////////////////////////////////////////////////////////////////
// FontsLanguagesWindowView
//
//  The contents of the "Fonts and Languages Preferences" dialog window.
//
class FontsLanguagesWindowView : public views::View,
                                 public views::DialogDelegate {
 public:
  explicit FontsLanguagesWindowView(Profile* profile);
  virtual ~FontsLanguagesWindowView();

  // views::DialogDelegate implementation:
  virtual bool Accept();

  // views::WindowDelegate Methods:
  virtual bool IsModal() const { return true; }
  virtual std::wstring GetWindowTitle() const;
  virtual views::View* GetContentsView();

  // views::View overrides:
  virtual void Layout();
  virtual gfx::Size GetPreferredSize();

  // Selects the Languages tab.
  void SelectLanguagesTab();

 protected:
  // views::View overrides:
  virtual void ViewHierarchyChanged(bool is_add,
                                    views::View* parent,
                                    views::View* child);
 private:
  // Init the assorted Tabbed pages
  void Init();

  // The Tab view that contains all of the options pages.
  views::TabbedPane* tabs_;

  // Fonts Page View handle remembered so that prefs is updated only when
  // OK is pressed.
  FontsPageView* fonts_page_;

  // Languages Page View handle remembered so that prefs is updated only when
  // OK is pressed.
  LanguagesPageView* languages_page_;

  // The Profile associated with these options.
  Profile* profile_;

  DISALLOW_EVIL_CONSTRUCTORS(FontsLanguagesWindowView);
};

#endif  // #ifndef CHROME_BROWSER_FONTS_LANGUAGE_WINDOW_H__