OLD | NEW |
| (Empty) |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CHROME_BROWSER_UI_VIEWS_OPTIONS_FONTS_LANGUAGES_WINDOW_VIEW_H_ | |
6 #define CHROME_BROWSER_UI_VIEWS_OPTIONS_FONTS_LANGUAGES_WINDOW_VIEW_H_ | |
7 #pragma once | |
8 | |
9 #include "chrome/browser/fonts_languages_window.h" | |
10 #include "views/view.h" | |
11 #include "views/window/dialog_delegate.h" | |
12 | |
13 class Profile; | |
14 class FontsPageView; | |
15 class LanguagesPageView; | |
16 | |
17 namespace views { | |
18 class TabbedPane; | |
19 } | |
20 | |
21 /////////////////////////////////////////////////////////////////////////////// | |
22 // FontsLanguagesWindowView | |
23 // | |
24 // The contents of the "Fonts and Languages Preferences" dialog window. | |
25 // | |
26 class FontsLanguagesWindowView : public views::View, | |
27 public views::DialogDelegate { | |
28 public: | |
29 explicit FontsLanguagesWindowView(Profile* profile); | |
30 virtual ~FontsLanguagesWindowView(); | |
31 | |
32 // views::DialogDelegate implementation: | |
33 virtual bool Accept(); | |
34 | |
35 // views::WindowDelegate Methods: | |
36 virtual bool IsModal() const { return true; } | |
37 virtual std::wstring GetWindowTitle() const; | |
38 virtual views::View* GetContentsView(); | |
39 virtual void WindowClosing(); | |
40 | |
41 // views::View overrides: | |
42 virtual void Layout(); | |
43 virtual gfx::Size GetPreferredSize(); | |
44 | |
45 // Shows the tab corresponding to the specified |page|. | |
46 void ShowTabPage(FontsLanguagesPage page); | |
47 | |
48 protected: | |
49 // views::View overrides: | |
50 virtual void ViewHierarchyChanged(bool is_add, | |
51 views::View* parent, | |
52 views::View* child); | |
53 private: | |
54 // Init the assorted Tabbed pages | |
55 void Init(); | |
56 | |
57 // The Tab view that contains all of the options pages. | |
58 views::TabbedPane* tabs_; | |
59 | |
60 // Fonts Page View handle remembered so that prefs is updated only when | |
61 // OK is pressed. | |
62 FontsPageView* fonts_page_; | |
63 | |
64 // Languages Page View handle remembered so that prefs is updated only when | |
65 // OK is pressed. | |
66 LanguagesPageView* languages_page_; | |
67 | |
68 // The Profile associated with these options. | |
69 Profile* profile_; | |
70 | |
71 DISALLOW_COPY_AND_ASSIGN(FontsLanguagesWindowView); | |
72 }; | |
73 | |
74 #endif // CHROME_BROWSER_UI_VIEWS_OPTIONS_FONTS_LANGUAGES_WINDOW_VIEW_H_ | |
OLD | NEW |