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

Side by Side Diff: chrome/browser/shell_dialogs.h

Issue 113441: ChromeFont->gfx::Font... (Closed) Base URL: svn://chrome-svn.corp.google.com/chrome/trunk/src/
Patch Set: Created 11 years, 7 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 | « chrome/browser/printing/printed_document.cc ('k') | chrome/browser/views/about_chrome_view.h » ('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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 #ifndef CHROME_BROWSER_SHELL_DIALOGS_H_ 5 #ifndef CHROME_BROWSER_SHELL_DIALOGS_H_
6 #define CHROME_BROWSER_SHELL_DIALOGS_H_ 6 #define CHROME_BROWSER_SHELL_DIALOGS_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/file_path.h" 11 #include "base/file_path.h"
12 #include "base/gfx/native_widget_types.h" 12 #include "base/gfx/native_widget_types.h"
13 #include "base/ref_counted.h" 13 #include "base/ref_counted.h"
14 #include "base/string16.h" 14 #include "base/string16.h"
15 15
16 class ChromeFont; 16 namespace gfx {
17 class Font;
18 }
17 19
18 // A base class for shell dialogs. 20 // A base class for shell dialogs.
19 class BaseShellDialog { 21 class BaseShellDialog {
20 public: 22 public:
21 // Returns true if a shell dialog box is currently being shown modally 23 // Returns true if a shell dialog box is currently being shown modally
22 // to the specified owner. 24 // to the specified owner.
23 virtual bool IsRunning(gfx::NativeWindow owning_window) const = 0; 25 virtual bool IsRunning(gfx::NativeWindow owning_window) const = 0;
24 26
25 // Notifies the dialog box that the listener has been destroyed and it should 27 // Notifies the dialog box that the listener has been destroyed and it should
26 // no longer be sent notifications. 28 // no longer be sent notifications.
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 virtual ~SelectFontDialog() {} 127 virtual ~SelectFontDialog() {}
126 128
127 // An interface implemented by a Listener object wishing to know about the 129 // An interface implemented by a Listener object wishing to know about the
128 // the result of the Select Font action. These callbacks must be 130 // the result of the Select Font action. These callbacks must be
129 // re-entrant. 131 // re-entrant.
130 class Listener { 132 class Listener {
131 public: 133 public:
132 // Notifies the Listener that a font selection has been made. The font 134 // Notifies the Listener that a font selection has been made. The font
133 // details are supplied in |font|. |params| is contextual passed to 135 // details are supplied in |font|. |params| is contextual passed to
134 // SelectFile. 136 // SelectFile.
135 virtual void FontSelected(const ChromeFont& font, void* params) = 0; 137 virtual void FontSelected(const gfx::Font& font, void* params) = 0;
136 138
137 // Notifies the Listener that the font selection was aborted (via the user 139 // Notifies the Listener that the font selection was aborted (via the user
138 // canceling or closing the selection dialog box, for example). |params| is 140 // canceling or closing the selection dialog box, for example). |params| is
139 // contextual passed to SelectFile. 141 // contextual passed to SelectFile.
140 virtual void FontSelectionCanceled(void* params) {}; 142 virtual void FontSelectionCanceled(void* params) {};
141 }; 143 };
142 144
143 // Creates a dialog box helper. This object is ref-counted, but the returned 145 // Creates a dialog box helper. This object is ref-counted, but the returned
144 // object will have no reference (refcount is 0). 146 // object will have no reference (refcount is 0).
145 static SelectFontDialog* Create(Listener* listener); 147 static SelectFontDialog* Create(Listener* listener);
(...skipping 15 matching lines...) Expand all
161 163
162 // Same as above - also support specifying the default font selected in the 164 // Same as above - also support specifying the default font selected in the
163 // list when the dialog appears. 165 // list when the dialog appears.
164 virtual void SelectFont(gfx::NativeWindow owning_window, 166 virtual void SelectFont(gfx::NativeWindow owning_window,
165 void* params, 167 void* params,
166 const std::wstring& font_name, 168 const std::wstring& font_name,
167 int font_size) = 0; 169 int font_size) = 0;
168 }; 170 };
169 171
170 #endif // CHROME_BROWSER_SHELL_DIALOGS_H_ 172 #endif // CHROME_BROWSER_SHELL_DIALOGS_H_
OLDNEW
« no previous file with comments | « chrome/browser/printing/printed_document.cc ('k') | chrome/browser/views/about_chrome_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698