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

Side by Side Diff: chrome/browser/views/options/general_page_view.cc

Issue 28104: Enable history and downloads by default, port NewTabUI from DOMUIHost to DOMU... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/views/download_shelf_view.cc ('k') | chrome/common/temp_scaffolding_stubs.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 #include "chrome/browser/views/options/general_page_view.h" 5 #include "chrome/browser/views/options/general_page_view.h"
6 6
7 #include "base/gfx/png_decoder.h" 7 #include "base/gfx/png_decoder.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "base/thread.h" 10 #include "base/thread.h"
11 #include "chrome/browser/browser.h" 11 #include "chrome/browser/browser.h"
12 #include "chrome/browser/browser_list.h" 12 #include "chrome/browser/browser_list.h"
13 #include "chrome/browser/browser_process.h" 13 #include "chrome/browser/browser_process.h"
14 #include "chrome/browser/dom_ui/new_tab_ui.h" 14 #include "chrome/browser/dom_ui/new_tab_ui.h"
15 #include "chrome/browser/history/history.h" 15 #include "chrome/browser/history/history.h"
16 #include "chrome/browser/net/url_fixer_upper.h" 16 #include "chrome/browser/net/url_fixer_upper.h"
17 #include "chrome/browser/profile.h" 17 #include "chrome/browser/profile.h"
18 #include "chrome/browser/session_startup_pref.h" 18 #include "chrome/browser/session_startup_pref.h"
19 #include "chrome/browser/search_engines/template_url.h" 19 #include "chrome/browser/search_engines/template_url.h"
20 #include "chrome/browser/search_engines/template_url_model.h" 20 #include "chrome/browser/search_engines/template_url_model.h"
21 #include "chrome/browser/shell_integration.h" 21 #include "chrome/browser/shell_integration.h"
22 #include "chrome/browser/views/keyword_editor_view.h" 22 #include "chrome/browser/views/keyword_editor_view.h"
23 #include "chrome/browser/views/options/options_group_view.h" 23 #include "chrome/browser/views/options/options_group_view.h"
24 #include "chrome/browser/views/standard_layout.h" 24 #include "chrome/browser/views/standard_layout.h"
25 #include "chrome/browser/dom_ui/new_tab_ui.h"
25 #include "chrome/common/chrome_constants.h" 26 #include "chrome/common/chrome_constants.h"
26 #include "chrome/common/l10n_util.h" 27 #include "chrome/common/l10n_util.h"
27 #include "chrome/common/pref_names.h" 28 #include "chrome/common/pref_names.h"
28 #include "chrome/common/pref_service.h" 29 #include "chrome/common/pref_service.h"
29 #include "chrome/common/resource_bundle.h" 30 #include "chrome/common/resource_bundle.h"
30 #include "chrome/views/checkbox.h" 31 #include "chrome/views/checkbox.h"
31 #include "chrome/views/grid_layout.h" 32 #include "chrome/views/grid_layout.h"
32 #include "chrome/views/label.h" 33 #include "chrome/views/label.h"
33 #include "chrome/views/radio_button.h" 34 #include "chrome/views/radio_button.h"
34 #include "chrome/views/table_view.h" 35 #include "chrome/views/table_view.h"
35 #include "chrome/views/text_field.h" 36 #include "chrome/views/text_field.h"
36 #include "grit/chromium_strings.h" 37 #include "grit/chromium_strings.h"
37 #include "grit/generated_resources.h" 38 #include "grit/generated_resources.h"
38 #include "grit/theme_resources.h" 39 #include "grit/theme_resources.h"
39 #include "skia/include/SkBitmap.h" 40 #include "skia/include/SkBitmap.h"
40 41
41 static const int kStartupRadioGroup = 1; 42 static const int kStartupRadioGroup = 1;
42 static const int kHomePageRadioGroup = 2; 43 static const int kHomePageRadioGroup = 2;
43 static const SkColor kDefaultBrowserLabelColor = SkColorSetRGB(0, 135, 0); 44 static const SkColor kDefaultBrowserLabelColor = SkColorSetRGB(0, 135, 0);
44 static const SkColor kNotDefaultBrowserLabelColor = SkColorSetRGB(135, 0, 0); 45 static const SkColor kNotDefaultBrowserLabelColor = SkColorSetRGB(135, 0, 0);
45 46
46 namespace { 47 namespace {
47 std::wstring GetNewTabUIURLString() { 48 std::wstring GetNewTabUIURLString() {
48 return UTF8ToWide(NewTabUIURL().spec()); 49 return UTF8ToWide(NewTabUI::GetBaseURL().spec());
49 } 50 }
50 } 51 }
51 52
52 /////////////////////////////////////////////////////////////////////////////// 53 ///////////////////////////////////////////////////////////////////////////////
53 // GeneralPageView::DefaultBrowserWorker 54 // GeneralPageView::DefaultBrowserWorker
54 // 55 //
55 // A helper object that handles checking if Chrome is the default browser on 56 // A helper object that handles checking if Chrome is the default browser on
56 // Windows and also setting it as the default browser. These operations are 57 // Windows and also setting it as the default browser. These operations are
57 // performed asynchronously on the file thread since registry access is 58 // performed asynchronously on the file thread since registry access is
58 // involved and this can be slow. 59 // involved and this can be slow.
(...skipping 1021 matching lines...) Expand 10 before | Expand all | Expand 10 after
1080 homepage_use_url_textfield_->SetReadOnly(true); 1081 homepage_use_url_textfield_->SetReadOnly(true);
1081 } 1082 }
1082 } 1083 }
1083 1084
1084 void GeneralPageView::SetDefaultSearchProvider() { 1085 void GeneralPageView::SetDefaultSearchProvider() {
1085 const int index = default_search_engine_combobox_->GetSelectedItem(); 1086 const int index = default_search_engine_combobox_->GetSelectedItem();
1086 default_search_engines_model_->model()->SetDefaultSearchProvider( 1087 default_search_engines_model_->model()->SetDefaultSearchProvider(
1087 default_search_engines_model_->GetTemplateURLAt(index)); 1088 default_search_engines_model_->GetTemplateURLAt(index));
1088 } 1089 }
1089 1090
OLDNEW
« no previous file with comments | « chrome/browser/views/download_shelf_view.cc ('k') | chrome/common/temp_scaffolding_stubs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698