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

Side by Side Diff: chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc

Issue 247193002: Remove touch layout (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | 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/views/tabs/browser_tab_strip_controller.h" 5 #include "chrome/browser/ui/views/tabs/browser_tab_strip_controller.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/prefs/pref_service.h" 9 #include "base/prefs/pref_service.h"
10 #include "base/task_runner_util.h" 10 #include "base/task_runner_util.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 63
64 TabStripLayoutType DetermineTabStripLayout( 64 TabStripLayoutType DetermineTabStripLayout(
65 PrefService* prefs, 65 PrefService* prefs,
66 chrome::HostDesktopType host_desktop_type, 66 chrome::HostDesktopType host_desktop_type,
67 bool* adjust_layout) { 67 bool* adjust_layout) {
68 *adjust_layout = false; 68 *adjust_layout = false;
69 if (CommandLine::ForCurrentProcess()->HasSwitch( 69 if (CommandLine::ForCurrentProcess()->HasSwitch(
70 switches::kEnableStackedTabStrip)) { 70 switches::kEnableStackedTabStrip)) {
71 return TAB_STRIP_LAYOUT_STACKED; 71 return TAB_STRIP_LAYOUT_STACKED;
72 } 72 }
73 // For chromeos always allow entering stacked mode. 73 // For ash, always allow entering stacked mode.
74 #if defined(USE_AURA)
75 if (host_desktop_type != chrome::HOST_DESKTOP_TYPE_ASH) 74 if (host_desktop_type != chrome::HOST_DESKTOP_TYPE_ASH)
76 return TAB_STRIP_LAYOUT_SHRINK; 75 return TAB_STRIP_LAYOUT_SHRINK;
77 #else
78 if (ui::GetDisplayLayout() != ui::LAYOUT_TOUCH)
79 return TAB_STRIP_LAYOUT_SHRINK;
80 #endif
81 *adjust_layout = true; 76 *adjust_layout = true;
82 switch (prefs->GetInteger(prefs::kTabStripLayoutType)) { 77 switch (prefs->GetInteger(prefs::kTabStripLayoutType)) {
83 case TAB_STRIP_LAYOUT_STACKED: 78 case TAB_STRIP_LAYOUT_STACKED:
84 return TAB_STRIP_LAYOUT_STACKED; 79 return TAB_STRIP_LAYOUT_STACKED;
85 default: 80 default:
86 return TAB_STRIP_LAYOUT_SHRINK; 81 return TAB_STRIP_LAYOUT_SHRINK;
87 } 82 }
88 } 83 }
89 84
90 // Get the MIME type of the file pointed to by the url, based on the file's 85 // Get the MIME type of the file pointed to by the url, based on the file's
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after
592 url, 587 url,
593 mime_type.empty() || 588 mime_type.empty() ||
594 net::IsSupportedMimeType(mime_type) || 589 net::IsSupportedMimeType(mime_type) ||
595 content::PluginService::GetInstance()->GetPluginInfo( 590 content::PluginService::GetInstance()->GetPluginInfo(
596 -1, // process ID 591 -1, // process ID
597 MSG_ROUTING_NONE, // routing ID 592 MSG_ROUTING_NONE, // routing ID
598 model_->profile()->GetResourceContext(), 593 model_->profile()->GetResourceContext(),
599 url, GURL(), mime_type, false, 594 url, GURL(), mime_type, false,
600 NULL, &plugin, NULL)); 595 NULL, &plugin, NULL));
601 } 596 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698