| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #include "chrome/browser/gtk/first_run_dialog.h" | 5 #include "chrome/browser/gtk/first_run_dialog.h" |
| 6 | 6 |
| 7 #include <string> |
| 8 #include <vector> |
| 9 |
| 7 #include "app/l10n_util.h" | 10 #include "app/l10n_util.h" |
| 8 #include "app/resource_bundle.h" | 11 #include "app/resource_bundle.h" |
| 9 #include "base/i18n/rtl.h" | 12 #include "base/i18n/rtl.h" |
| 10 #include "base/message_loop.h" | 13 #include "base/message_loop.h" |
| 11 #include "base/utf_string_conversions.h" | 14 #include "base/utf_string_conversions.h" |
| 12 #include "chrome/browser/browser_process.h" | |
| 13 #include "chrome/browser/gtk/gtk_chrome_link_button.h" | 15 #include "chrome/browser/gtk/gtk_chrome_link_button.h" |
| 14 #include "chrome/browser/gtk/gtk_floating_container.h" | 16 #include "chrome/browser/gtk/gtk_floating_container.h" |
| 15 #include "chrome/browser/gtk/gtk_util.h" | 17 #include "chrome/browser/gtk/gtk_util.h" |
| 16 #include "chrome/browser/platform_util.h" | 18 #include "chrome/browser/platform_util.h" |
| 17 #include "chrome/browser/prefs/pref_service.h" | |
| 18 #include "chrome/browser/process_singleton.h" | 19 #include "chrome/browser/process_singleton.h" |
| 19 #include "chrome/browser/profiles/profile.h" | 20 #include "chrome/browser/profiles/profile.h" |
| 20 #include "chrome/browser/search_engines/template_url.h" | 21 #include "chrome/browser/search_engines/template_url.h" |
| 21 #include "chrome/browser/search_engines/template_url_model.h" | 22 #include "chrome/browser/search_engines/template_url_model.h" |
| 22 #include "chrome/browser/shell_integration.h" | 23 #include "chrome/browser/shell_integration.h" |
| 23 #include "chrome/common/pref_names.h" | 24 #include "chrome/common/pref_names.h" |
| 24 #include "chrome/installer/util/google_update_settings.h" | 25 #include "chrome/installer/util/google_update_settings.h" |
| 25 #include "grit/chromium_strings.h" | 26 #include "grit/chromium_strings.h" |
| 26 #include "grit/generated_resources.h" | 27 #include "grit/generated_resources.h" |
| 27 #include "grit/locale_settings.h" | 28 #include "grit/locale_settings.h" |
| 28 #include "grit/theme_resources.h" | 29 #include "grit/theme_resources.h" |
| 29 | 30 |
| 30 #if defined(USE_LINUX_BREAKPAD) | 31 #if defined(USE_LINUX_BREAKPAD) |
| 31 #include "chrome/app/breakpad_linux.h" | 32 #include "chrome/app/breakpad_linux.h" |
| 32 #endif | 33 #endif |
| 33 | 34 |
| 35 #if defined(GOOGLE_CHROME_BUILD) |
| 36 #include "chrome/browser/browser_process.h" |
| 37 #include "chrome/browser/prefs/pref_service.h" |
| 38 #endif |
| 39 |
| 34 namespace { | 40 namespace { |
| 35 | 41 |
| 36 const gchar* kSearchEngineKey = "template-url-search-engine"; | 42 const gchar* kSearchEngineKey = "template-url-search-engine"; |
| 37 | 43 |
| 38 // Height of the label that displays the search engine's logo (in lieu of the | 44 // Height of the label that displays the search engine's logo (in lieu of the |
| 39 // actual logo) in chromium. | 45 // actual logo) in chromium. |
| 40 const int kLogoLabelHeight = 100; | 46 const int kLogoLabelHeight = 100; |
| 41 | 47 |
| 42 // Size of the small logo (for when we show 4 search engines). | 48 // Size of the small logo (for when we show 4 search engines). |
| 43 const int kLogoLabelWidthSmall = 132; | 49 const int kLogoLabelWidthSmall = 132; |
| (...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 409 } | 415 } |
| 410 | 416 |
| 411 void FirstRunDialog::FirstRunDone() { | 417 void FirstRunDialog::FirstRunDone() { |
| 412 FirstRun::SetShowWelcomePagePref(); | 418 FirstRun::SetShowWelcomePagePref(); |
| 413 | 419 |
| 414 if (dialog_) | 420 if (dialog_) |
| 415 gtk_widget_destroy(dialog_); | 421 gtk_widget_destroy(dialog_); |
| 416 MessageLoop::current()->Quit(); | 422 MessageLoop::current()->Quit(); |
| 417 delete this; | 423 delete this; |
| 418 } | 424 } |
| OLD | NEW |