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

Side by Side Diff: chrome/browser/ui/tab_contents/tab_contents_wrapper.cc

Issue 8652002: Move PropertyBag to base. Originally this was in chrome\common because only chrome used it. Now t... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: move to base namespace and forward declare where possible Created 9 years, 1 month 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
OLDNEW
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 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" 5 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
6 6
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 #include "content/browser/tab_contents/tab_contents_view.h" 58 #include "content/browser/tab_contents/tab_contents_view.h"
59 #include "content/public/browser/notification_service.h" 59 #include "content/public/browser/notification_service.h"
60 #include "grit/generated_resources.h" 60 #include "grit/generated_resources.h"
61 #include "grit/locale_settings.h" 61 #include "grit/locale_settings.h"
62 #include "grit/platform_locale_settings.h" 62 #include "grit/platform_locale_settings.h"
63 #include "ui/base/l10n/l10n_util.h" 63 #include "ui/base/l10n/l10n_util.h"
64 #include "webkit/glue/webpreferences.h" 64 #include "webkit/glue/webpreferences.h"
65 65
66 namespace { 66 namespace {
67 67
68 static base::LazyInstance<PropertyAccessor<TabContentsWrapper*> > 68 static base::LazyInstance<base::PropertyAccessor<TabContentsWrapper*> >
69 g_tab_contents_wrapper_property_accessor = LAZY_INSTANCE_INITIALIZER; 69 g_tab_contents_wrapper_property_accessor = LAZY_INSTANCE_INITIALIZER;
70 70
71 // The list of prefs we want to observe. 71 // The list of prefs we want to observe.
72 const char* kPrefsToObserve[] = { 72 const char* kPrefsToObserve[] = {
73 prefs::kAlternateErrorPagesEnabled, 73 prefs::kAlternateErrorPagesEnabled,
74 prefs::kDefaultCharset, 74 prefs::kDefaultCharset,
75 prefs::kDefaultZoomLevel, 75 prefs::kDefaultZoomLevel,
76 prefs::kEnableReferrers, 76 prefs::kEnableReferrers,
77 #if defined (ENABLE_SAFE_BROWSING) 77 #if defined (ENABLE_SAFE_BROWSING)
78 prefs::kSafeBrowsingEnabled, 78 prefs::kSafeBrowsingEnabled,
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 tab_contents()->GetMutableRendererPrefs(), profile()); 355 tab_contents()->GetMutableRendererPrefs(), profile());
356 } 356 }
357 357
358 TabContentsWrapper::~TabContentsWrapper() { 358 TabContentsWrapper::~TabContentsWrapper() {
359 in_destructor_ = true; 359 in_destructor_ = true;
360 360
361 // Need to tear down infobars before the TabContents goes away. 361 // Need to tear down infobars before the TabContents goes away.
362 infobar_tab_helper_.reset(); 362 infobar_tab_helper_.reset();
363 } 363 }
364 364
365 PropertyAccessor<TabContentsWrapper*>* TabContentsWrapper::property_accessor() { 365 base::PropertyAccessor<TabContentsWrapper*>*
366 TabContentsWrapper::property_accessor() {
366 return g_tab_contents_wrapper_property_accessor.Pointer(); 367 return g_tab_contents_wrapper_property_accessor.Pointer();
367 } 368 }
368 369
369 // static 370 // static
370 void TabContentsWrapper::RegisterUserPrefs(PrefService* prefs) { 371 void TabContentsWrapper::RegisterUserPrefs(PrefService* prefs) {
371 prefs->RegisterBooleanPref(prefs::kAlternateErrorPagesEnabled, 372 prefs->RegisterBooleanPref(prefs::kAlternateErrorPagesEnabled,
372 true, 373 true,
373 PrefService::SYNCABLE_PREF); 374 PrefService::SYNCABLE_PREF);
374 375
375 WebPreferences pref_defaults; 376 WebPreferences pref_defaults;
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
715 render_view_host()->Send( 716 render_view_host()->Send(
716 new ChromeViewMsg_SetClientSidePhishingDetection(routing_id(), 717 new ChromeViewMsg_SetClientSidePhishingDetection(routing_id(),
717 safe_browsing)); 718 safe_browsing));
718 #endif 719 #endif
719 } 720 }
720 721
721 void TabContentsWrapper::ExitFullscreenMode() { 722 void TabContentsWrapper::ExitFullscreenMode() {
722 if (tab_contents() && render_view_host()) 723 if (tab_contents() && render_view_host())
723 tab_contents()->render_view_host()->ExitFullscreen(); 724 tab_contents()->render_view_host()->ExitFullscreen();
724 } 725 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/tab_contents/tab_contents_wrapper.h ('k') | chrome/browser/ui/views/omnibox/omnibox_view_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698