| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_UI_GTK_EDIT_SEARCH_ENGINE_DIALOG_H_ | 5 #ifndef CHROME_BROWSER_UI_GTK_EDIT_SEARCH_ENGINE_DIALOG_H_ |
| 6 #define CHROME_BROWSER_UI_GTK_EDIT_SEARCH_ENGINE_DIALOG_H_ | 6 #define CHROME_BROWSER_UI_GTK_EDIT_SEARCH_ENGINE_DIALOG_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <gtk/gtk.h> | 9 #include <gtk/gtk.h> |
| 10 #include <string> | 10 #include <string> |
| 11 | 11 |
| 12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
| 13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
| 14 #include "base/string16.h" | 14 #include "base/string16.h" |
| 15 #include "ui/base/gtk/gtk_signal.h" | 15 #include "ui/base/gtk/gtk_signal.h" |
| 16 | 16 |
| 17 class EditSearchEngineController; | 17 class EditSearchEngineController; |
| 18 class EditSearchEngineControllerDelegate; | 18 class EditSearchEngineControllerDelegate; |
| 19 class Profile; | 19 class Profile; |
| 20 class TemplateURL; | 20 class TemplateURL; |
| 21 | 21 |
| 22 class EditSearchEngineDialog { | 22 class EditSearchEngineDialog { |
| 23 public: | 23 public: |
| 24 EditSearchEngineDialog(GtkWindow* parent_window, | 24 EditSearchEngineDialog(GtkWindow* parent_window, |
| 25 const TemplateURL* template_url, | 25 const TemplateURL* template_url, |
| 26 EditSearchEngineControllerDelegate* delegate, | 26 EditSearchEngineControllerDelegate* delegate, |
| 27 Profile* profile); | 27 Profile* profile); |
| 28 virtual ~EditSearchEngineDialog(); | 28 ~EditSearchEngineDialog(); |
| 29 | 29 |
| 30 private: | 30 private: |
| 31 // Create and show the window. | 31 // Create and show the window. |
| 32 void Init(GtkWindow* parent_window, Profile* profile); | 32 void Init(GtkWindow* parent_window, Profile* profile); |
| 33 | 33 |
| 34 // Retrieve the user input in the various fields. | 34 // Retrieve the user input in the various fields. |
| 35 string16 GetTitleInput() const; | 35 string16 GetTitleInput() const; |
| 36 string16 GetKeywordInput() const; | 36 string16 GetKeywordInput() const; |
| 37 std::string GetURLInput() const; | 37 std::string GetURLInput() const; |
| 38 | 38 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 // The ok button (we need a reference to it so we can de-activate it when the | 70 // The ok button (we need a reference to it so we can de-activate it when the |
| 71 // entries are not all filled in.) | 71 // entries are not all filled in.) |
| 72 GtkWidget* ok_button_; | 72 GtkWidget* ok_button_; |
| 73 | 73 |
| 74 scoped_ptr<EditSearchEngineController> controller_; | 74 scoped_ptr<EditSearchEngineController> controller_; |
| 75 | 75 |
| 76 DISALLOW_COPY_AND_ASSIGN(EditSearchEngineDialog); | 76 DISALLOW_COPY_AND_ASSIGN(EditSearchEngineDialog); |
| 77 }; | 77 }; |
| 78 | 78 |
| 79 #endif // CHROME_BROWSER_UI_GTK_EDIT_SEARCH_ENGINE_DIALOG_H_ | 79 #endif // CHROME_BROWSER_UI_GTK_EDIT_SEARCH_ENGINE_DIALOG_H_ |
| OLD | NEW |