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

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

Issue 83001: ImportantFileWriter (Closed)
Patch Set: share more code Created 11 years, 8 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/tab_contents/web_contents_unittest.cc ('k') | chrome/chrome.gyp » ('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/options_page_view.h" 5 #include "chrome/browser/views/options/options_page_view.h"
6 6
7 #include "chrome/browser/browser_process.h" 7 #include "chrome/browser/browser_process.h"
8 #include "chrome/browser/metrics/user_metrics.h" 8 #include "chrome/browser/metrics/user_metrics.h"
9 #include "chrome/common/notification_service.h" 9 #include "chrome/common/notification_service.h"
10 #include "chrome/common/pref_service.h" 10 #include "chrome/common/pref_service.h"
11 #include "chrome/views/widget/widget.h" 11 #include "chrome/views/widget/widget.h"
12 12
13 /////////////////////////////////////////////////////////////////////////////// 13 ///////////////////////////////////////////////////////////////////////////////
14 // OptionsPageView 14 // OptionsPageView
15 15
16 OptionsPageView::OptionsPageView(Profile* profile) 16 OptionsPageView::OptionsPageView(Profile* profile)
17 : profile_(profile), 17 : profile_(profile),
18 initialized_(false) { 18 initialized_(false) {
19 } 19 }
20 20
21 OptionsPageView::~OptionsPageView() { 21 OptionsPageView::~OptionsPageView() {
22 } 22 }
23 23
24 void OptionsPageView::UserMetricsRecordAction(const wchar_t* action, 24 void OptionsPageView::UserMetricsRecordAction(const wchar_t* action,
25 PrefService* prefs) { 25 PrefService* prefs) {
26 UserMetrics::RecordComputedAction(action, profile()); 26 UserMetrics::RecordComputedAction(action, profile());
27 if (prefs) 27 if (prefs)
28 prefs->ScheduleSavePersistentPrefs(g_browser_process->file_thread()); 28 prefs->ScheduleSavePersistentPrefs();
29 } 29 }
30 30
31 /////////////////////////////////////////////////////////////////////////////// 31 ///////////////////////////////////////////////////////////////////////////////
32 // OptionsPageView, NotificationObserver implementation: 32 // OptionsPageView, NotificationObserver implementation:
33 33
34 void OptionsPageView::Observe(NotificationType type, 34 void OptionsPageView::Observe(NotificationType type,
35 const NotificationSource& source, 35 const NotificationSource& source,
36 const NotificationDetails& details) { 36 const NotificationDetails& details) {
37 if (type == NotificationType::PREF_CHANGED) 37 if (type == NotificationType::PREF_CHANGED)
38 NotifyPrefChanged(Details<std::wstring>(details).ptr()); 38 NotifyPrefChanged(Details<std::wstring>(details).ptr());
(...skipping 12 matching lines...) Expand all
51 InitControlLayout(); 51 InitControlLayout();
52 NotifyPrefChanged(NULL); 52 NotifyPrefChanged(NULL);
53 } 53 }
54 } 54 }
55 55
56 HWND OptionsPageView::GetRootWindow() const { 56 HWND OptionsPageView::GetRootWindow() const {
57 // Our Widget is the TabbedPane content HWND, which is a child HWND. 57 // Our Widget is the TabbedPane content HWND, which is a child HWND.
58 // We need the root HWND for parenting. 58 // We need the root HWND for parenting.
59 return GetAncestor(GetWidget()->GetNativeView(), GA_ROOT); 59 return GetAncestor(GetWidget()->GetNativeView(), GA_ROOT);
60 } 60 }
OLDNEW
« no previous file with comments | « chrome/browser/tab_contents/web_contents_unittest.cc ('k') | chrome/chrome.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698