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

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

Issue 60353003: Enables stacked tabs for aura-metro (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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
« no previous file with comments | « chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc ('k') | no next file » | 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) 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/tab_strip.h" 5 #include "chrome/browser/ui/views/tabs/tab_strip.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windowsx.h> 8 #include <windowsx.h>
9 #endif 9 #endif
10 10
11 #include <algorithm> 11 #include <algorithm>
12 #include <iterator> 12 #include <iterator>
13 #include <string> 13 #include <string>
14 #include <vector> 14 #include <vector>
15 15
16 #include "base/compiler_specific.h" 16 #include "base/compiler_specific.h"
17 #include "base/metrics/histogram.h" 17 #include "base/metrics/histogram.h"
18 #include "base/stl_util.h" 18 #include "base/stl_util.h"
19 #include "base/strings/utf_string_conversions.h" 19 #include "base/strings/utf_string_conversions.h"
20 #include "chrome/browser/defaults.h" 20 #include "chrome/browser/defaults.h"
21 #include "chrome/browser/ui/host_desktop.h"
21 #include "chrome/browser/ui/tabs/tab_strip_model.h" 22 #include "chrome/browser/ui/tabs/tab_strip_model.h"
22 #include "chrome/browser/ui/view_ids.h" 23 #include "chrome/browser/ui/view_ids.h"
23 #include "chrome/browser/ui/views/tabs/stacked_tab_strip_layout.h" 24 #include "chrome/browser/ui/views/tabs/stacked_tab_strip_layout.h"
24 #include "chrome/browser/ui/views/tabs/tab.h" 25 #include "chrome/browser/ui/views/tabs/tab.h"
25 #include "chrome/browser/ui/views/tabs/tab_drag_controller.h" 26 #include "chrome/browser/ui/views/tabs/tab_drag_controller.h"
26 #include "chrome/browser/ui/views/tabs/tab_strip_controller.h" 27 #include "chrome/browser/ui/views/tabs/tab_strip_controller.h"
27 #include "chrome/browser/ui/views/tabs/tab_strip_observer.h" 28 #include "chrome/browser/ui/views/tabs/tab_strip_observer.h"
28 #include "chrome/browser/ui/views/touch_uma/touch_uma.h" 29 #include "chrome/browser/ui/views/touch_uma/touch_uma.h"
29 #include "content/public/browser/user_metrics.h" 30 #include "content/public/browser/user_metrics.h"
30 #include "grit/generated_resources.h" 31 #include "grit/generated_resources.h"
(...skipping 2689 matching lines...) Expand 10 before | Expand all | Expand 10 after
2720 if (reset_to_shrink_on_exit_) 2721 if (reset_to_shrink_on_exit_)
2721 AddMessageLoopObserver(); 2722 AddMessageLoopObserver();
2722 else 2723 else
2723 RemoveMessageLoopObserver(); 2724 RemoveMessageLoopObserver();
2724 } 2725 }
2725 2726
2726 bool TabStrip::GetAdjustLayout() const { 2727 bool TabStrip::GetAdjustLayout() const {
2727 if (!adjust_layout_) 2728 if (!adjust_layout_)
2728 return false; 2729 return false;
2729 2730
2730 #if !defined(OS_CHROMEOS) 2731 #if defined(USE_AURA)
2732 return chrome::GetHostDesktopTypeForNativeView(
2733 GetWidget()->GetNativeView()) == chrome::HOST_DESKTOP_TYPE_ASH;
2734 #else
2731 if (ui::GetDisplayLayout() != ui::LAYOUT_TOUCH) 2735 if (ui::GetDisplayLayout() != ui::LAYOUT_TOUCH)
2732 return false; 2736 return false;
2733 #endif 2737 #endif
2734 2738
2735 return true; 2739 return true;
2736 } 2740 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698