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

Side by Side Diff: chrome/browser/tab_closeable_state_watcher.cc

Issue 5741001: Even more virtual method deinlining. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase (windows) Created 10 years 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/tab_closeable_state_watcher.h" 5 #include "chrome/browser/tab_closeable_state_watcher.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "chrome/common/chrome_switches.h" 8 #include "chrome/common/chrome_switches.h"
9 9
10 #if defined(OS_CHROMEOS) 10 #if defined(OS_CHROMEOS)
11 #include "chrome/browser/chromeos/tab_closeable_state_watcher.h" 11 #include "chrome/browser/chromeos/tab_closeable_state_watcher.h"
12 #endif // defined(OS_CHROMEOS) 12 #endif // defined(OS_CHROMEOS)
13 13
14 //////////////////////////////////////////////////////////////////////////////// 14 ////////////////////////////////////////////////////////////////////////////////
15 // TabCloseableStateWatcher, static: 15 // TabCloseableStateWatcher, static:
16 16
17 ::TabCloseableStateWatcher* ::TabCloseableStateWatcher::Create() { 17 ::TabCloseableStateWatcher* ::TabCloseableStateWatcher::Create() {
18 ::TabCloseableStateWatcher* watcher = NULL; 18 ::TabCloseableStateWatcher* watcher = NULL;
19 #if defined(OS_CHROMEOS) 19 #if defined(OS_CHROMEOS)
20 // We only watch closeable state of tab on chromeos, and only when it's not 20 // We only watch closeable state of tab on chromeos, and only when it's not
21 // disabled (tests will have the disable switch). 21 // disabled (tests will have the disable switch).
22 if (!CommandLine::ForCurrentProcess()->HasSwitch( 22 if (!CommandLine::ForCurrentProcess()->HasSwitch(
23 switches::kDisableTabCloseableStateWatcher)) 23 switches::kDisableTabCloseableStateWatcher))
24 watcher = new chromeos::TabCloseableStateWatcher(); 24 watcher = new chromeos::TabCloseableStateWatcher();
25 #endif // OS_CHROMEOS 25 #endif // OS_CHROMEOS
26 if (!watcher) 26 if (!watcher)
27 watcher = new ::TabCloseableStateWatcher(); 27 watcher = new ::TabCloseableStateWatcher();
28 return watcher; 28 return watcher;
29 } 29 }
30
31 bool TabCloseableStateWatcher::CanCloseTab(const Browser* browser) const {
32 return true;
33 }
34
35 bool TabCloseableStateWatcher::CanCloseBrowser(Browser* browser) {
36 return true;
37 }
OLDNEW
« no previous file with comments | « chrome/browser/tab_closeable_state_watcher.h ('k') | chrome/browser/tab_contents/background_contents.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698