OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
satorux1
2011/01/28 06:03:49
I think you can remove this file as well.
falken
2011/01/28 07:55:14
Done.
| |
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 "base/scoped_ptr.h" | 5 #include "base/scoped_ptr.h" |
6 #include "chrome/browser/browser_process.h" | 6 #include "chrome/browser/browser_process.h" |
7 #include "chrome/browser/chromeos/options/internet_page_view.h" | 7 #include "chrome/browser/chromeos/options/settings_page_view.h" |
8 #include "chrome/browser/chromeos/options/system_page_view.h" | |
9 #include "chrome/browser/profiles/profile.h" | 8 #include "chrome/browser/profiles/profile.h" |
10 #include "chrome/browser/ui/browser_list.h" | 9 #include "chrome/browser/ui/browser_list.h" |
11 #include "chrome/browser/ui/browser_window.h" | 10 #include "chrome/browser/ui/browser_window.h" |
12 #include "chrome/browser/ui/gtk/options/advanced_page_gtk.h" | 11 #include "chrome/browser/ui/gtk/options/advanced_page_gtk.h" |
13 #include "chrome/browser/ui/gtk/options/content_page_gtk.h" | 12 #include "chrome/browser/ui/gtk/options/content_page_gtk.h" |
14 #include "chrome/browser/ui/gtk/options/general_page_gtk.h" | 13 #include "chrome/browser/ui/gtk/options/general_page_gtk.h" |
15 #include "chrome/browser/ui/options/options_window.h" | 14 #include "chrome/browser/ui/options/options_window.h" |
16 #include "chrome/browser/ui/views/accessible_view_helper.h" | 15 #include "chrome/browser/ui/views/accessible_view_helper.h" |
17 #include "chrome/browser/ui/views/window.h" | 16 #include "chrome/browser/ui/views/window.h" |
18 #include "chrome/browser/ui/window_sizer.h" | 17 #include "chrome/browser/ui/window_sizer.h" |
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
288 | 287 |
289 // Set vertical padding of tab header. | 288 // Set vertical padding of tab header. |
290 gtk_notebook_set_tab_vborder(GTK_NOTEBOOK(notebook), 5); | 289 gtk_notebook_set_tab_vborder(GTK_NOTEBOOK(notebook), 5); |
291 | 290 |
292 // Set a name for notebook. Note that the name is also used in theme engine | 291 // Set a name for notebook. Note that the name is also used in theme engine |
293 // to apply specific drawings for this widget. | 292 // to apply specific drawings for this widget. |
294 gtk_widget_set_name(GTK_WIDGET(notebook), "chromeos-options-tab"); | 293 gtk_widget_set_name(GTK_WIDGET(notebook), "chromeos-options-tab"); |
295 | 294 |
296 // Setup tab pages. | 295 // Setup tab pages. |
297 int tab_index = 0; | 296 int tab_index = 0; |
298 | |
299 SystemPageView* system_page = new SystemPageView(profile_); | |
300 system_page->set_background(views::Background::CreateSolidBackground( | |
301 SK_ColorWHITE)); | |
302 tabs_->AddTabAtIndex(tab_index++, | |
303 UTF16ToWide(l10n_util::GetStringUTF16( | |
304 IDS_OPTIONS_SYSTEM_TAB_LABEL)), | |
305 system_page, false); | |
306 | |
307 InternetPageView* internet_page = new InternetPageView(profile_); | |
308 internet_page->set_background(views::Background::CreateSolidBackground( | |
309 SK_ColorWHITE)); | |
310 tabs_->AddTabAtIndex(tab_index++, | |
311 UTF16ToWide(l10n_util::GetStringUTF16( | |
312 IDS_OPTIONS_INTERNET_TAB_LABEL)), | |
313 internet_page, false); | |
314 | |
315 tabs_->AddTabAtIndex(tab_index++, | 297 tabs_->AddTabAtIndex(tab_index++, |
316 UTF16ToWide(l10n_util::GetStringUTF16( | 298 UTF16ToWide(l10n_util::GetStringUTF16( |
317 IDS_OPTIONS_GENERAL_TAB_LABEL)), | 299 IDS_OPTIONS_GENERAL_TAB_LABEL)), |
318 new GtkPreferencePageHost( | 300 new GtkPreferencePageHost( |
319 general_page_.get_page_widget()), | 301 general_page_.get_page_widget()), |
320 false); | 302 false); |
321 | 303 |
322 tabs_->AddTabAtIndex(tab_index++, | 304 tabs_->AddTabAtIndex(tab_index++, |
323 UTF16ToWide(l10n_util::GetStringUTF16( | 305 UTF16ToWide(l10n_util::GetStringUTF16( |
324 IDS_OPTIONS_CONTENT_TAB_LABEL)), | 306 IDS_OPTIONS_CONTENT_TAB_LABEL)), |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
383 // a new one for the current active browser. | 365 // a new one for the current active browser. |
384 chromeos::CloseOptionsWindow(); | 366 chromeos::CloseOptionsWindow(); |
385 | 367 |
386 OptionsWindowView::instance_ = new OptionsWindowView(profile); | 368 OptionsWindowView::instance_ = new OptionsWindowView(profile); |
387 browser::CreateViewsWindow(chromeos::GetOptionsViewParent(), | 369 browser::CreateViewsWindow(chromeos::GetOptionsViewParent(), |
388 gfx::Rect(), | 370 gfx::Rect(), |
389 OptionsWindowView::instance_); | 371 OptionsWindowView::instance_); |
390 | 372 |
391 OptionsWindowView::instance_->ShowOptionsPage(page, highlight_group); | 373 OptionsWindowView::instance_->ShowOptionsPage(page, highlight_group); |
392 } | 374 } |
OLD | NEW |