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

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

Issue 202993002: Fix "unreachable code" warnings (MSVC warning 4702) in chrome/browser/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 6 years, 9 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/tab_drag_controller.h" 5 #include "chrome/browser/ui/views/tabs/tab_drag_controller.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 #include <set> 8 #include <set>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 #endif 89 #endif
90 } 90 }
91 91
92 // Returns true if |tab_strip| browser window is docked. 92 // Returns true if |tab_strip| browser window is docked.
93 bool IsDockedOrSnapped(const TabStrip* tab_strip) { 93 bool IsDockedOrSnapped(const TabStrip* tab_strip) {
94 #if defined(USE_ASH) 94 #if defined(USE_ASH)
95 DCHECK(tab_strip); 95 DCHECK(tab_strip);
96 ash::wm::WindowState* window_state = 96 ash::wm::WindowState* window_state =
97 ash::wm::GetWindowState(tab_strip->GetWidget()->GetNativeWindow()); 97 ash::wm::GetWindowState(tab_strip->GetWidget()->GetNativeWindow());
98 return window_state->IsDocked() || window_state->IsSnapped(); 98 return window_state->IsDocked() || window_state->IsSnapped();
99 #else
100 return false;
99 #endif 101 #endif
100 return false;
101 } 102 }
102 103
103 // Returns true if |bounds| contains the y-coordinate |y|. The y-coordinate 104 // Returns true if |bounds| contains the y-coordinate |y|. The y-coordinate
104 // of |bounds| is adjusted by |vertical_adjustment|. 105 // of |bounds| is adjusted by |vertical_adjustment|.
105 bool DoesRectContainVerticalPointExpanded( 106 bool DoesRectContainVerticalPointExpanded(
106 const gfx::Rect& bounds, 107 const gfx::Rect& bounds,
107 int vertical_adjustment, 108 int vertical_adjustment,
108 int y) { 109 int y) {
109 int upper_threshold = bounds.bottom() + vertical_adjustment; 110 int upper_threshold = bounds.bottom() + vertical_adjustment;
110 int lower_threshold = bounds.y() - vertical_adjustment; 111 int lower_threshold = bounds.y() - vertical_adjustment;
(...skipping 1795 matching lines...) Expand 10 before | Expand all | Expand 10 after
1906 aura::Window* dragged_window = 1907 aura::Window* dragged_window =
1907 attached_tabstrip_->GetWidget()->GetNativeView(); 1908 attached_tabstrip_->GetWidget()->GetNativeView();
1908 if (dragged_window) 1909 if (dragged_window)
1909 exclude.insert(dragged_window); 1910 exclude.insert(dragged_window);
1910 } 1911 }
1911 return GetLocalProcessWindowAtPoint(host_desktop_type_, 1912 return GetLocalProcessWindowAtPoint(host_desktop_type_,
1912 screen_point, 1913 screen_point,
1913 exclude); 1914 exclude);
1914 1915
1915 } 1916 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/hung_renderer_view.cc ('k') | chrome/browser/ui/views/tabs/tab_strip.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698