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

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

Issue 10560015: Implement base::win::IsMetroProcess. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 8 years, 6 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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.h" 5 #include "chrome/browser/ui/tab_contents/tab_contents.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/lazy_instance.h" 8 #include "base/lazy_instance.h"
9 #include "chrome/browser/autocomplete_history_manager.h" 9 #include "chrome/browser/autocomplete_history_manager.h"
10 #include "chrome/browser/autofill/autofill_external_delegate.h" 10 #include "chrome/browser/autofill/autofill_external_delegate.h"
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 webnavigation_observer_.reset( 135 webnavigation_observer_.reset(
136 new extensions::WebNavigationTabObserver(contents)); 136 new extensions::WebNavigationTabObserver(contents));
137 external_protocol_observer_.reset(new ExternalProtocolObserver(contents)); 137 external_protocol_observer_.reset(new ExternalProtocolObserver(contents));
138 pdf_tab_observer_.reset(new PDFTabObserver(this)); 138 pdf_tab_observer_.reset(new PDFTabObserver(this));
139 safe_browsing_tab_observer_.reset( 139 safe_browsing_tab_observer_.reset(
140 new safe_browsing::SafeBrowsingTabObserver(this)); 140 new safe_browsing::SafeBrowsingTabObserver(this));
141 141
142 #if defined(OS_WIN) 142 #if defined(OS_WIN)
143 // Metro mode Chrome on Windows does not support plugins. Avoid registering 143 // Metro mode Chrome on Windows does not support plugins. Avoid registering
144 // the PluginObserver so we don't popup plugin-related infobars. 144 // the PluginObserver so we don't popup plugin-related infobars.
145 if (!base::win::GetMetroModule()) 145 if (!base::win::IsMetroProcess())
146 plugin_observer_.reset(new PluginObserver(this)); 146 plugin_observer_.reset(new PluginObserver(this));
147 #else 147 #else
148 plugin_observer_.reset(new PluginObserver(this)); 148 plugin_observer_.reset(new PluginObserver(this));
149 #endif 149 #endif
150 150
151 #if !defined(OS_ANDROID) 151 #if !defined(OS_ANDROID)
152 if (OmniboxSearchHint::IsEnabled(profile())) 152 if (OmniboxSearchHint::IsEnabled(profile()))
153 omnibox_search_hint_.reset(new OmniboxSearchHint(this)); 153 omnibox_search_hint_.reset(new OmniboxSearchHint(this));
154 #endif 154 #endif
155 155
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 239
240 //////////////////////////////////////////////////////////////////////////////// 240 ////////////////////////////////////////////////////////////////////////////////
241 // WebContentsObserver overrides 241 // WebContentsObserver overrides
242 242
243 void TabContents::WebContentsDestroyed(WebContents* tab) { 243 void TabContents::WebContentsDestroyed(WebContents* tab) {
244 // Destruction of the WebContents should only be done by us from our 244 // Destruction of the WebContents should only be done by us from our
245 // destructor. Otherwise it's very likely we (or one of the helpers we own) 245 // destructor. Otherwise it's very likely we (or one of the helpers we own)
246 // will attempt to access the WebContents and we'll crash. 246 // will attempt to access the WebContents and we'll crash.
247 DCHECK(in_destructor_); 247 DCHECK(in_destructor_);
248 } 248 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_win.cc ('k') | chrome/browser/ui/views/bookmarks/bookmark_context_menu_controller_views_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698