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

Side by Side Diff: chrome/browser/ui/views/frame/browser_view_layout.cc

Issue 29263007: linux and chromeos: Turn on -Wunused-const-variable. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 7 years, 2 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
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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/frame/browser_view_layout.h" 5 #include "chrome/browser/ui/views/frame/browser_view_layout.h"
6 6
7 #include "base/observer_list.h" 7 #include "base/observer_list.h"
8 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/browser/ui/browser.h" 9 #include "chrome/browser/ui/browser.h"
10 #include "chrome/browser/ui/browser_finder.h" 10 #include "chrome/browser/ui/browser_finder.h"
(...skipping 21 matching lines...) Expand all
32 32
33 using views::View; 33 using views::View;
34 using web_modal::WebContentsModalDialogHost; 34 using web_modal::WebContentsModalDialogHost;
35 using web_modal::ModalDialogHostObserver; 35 using web_modal::ModalDialogHostObserver;
36 36
37 namespace { 37 namespace {
38 38
39 // The visible height of the shadow above the tabs. Clicks in this area are 39 // The visible height of the shadow above the tabs. Clicks in this area are
40 // treated as clicks to the frame, rather than clicks to the tab. 40 // treated as clicks to the frame, rather than clicks to the tab.
41 const int kTabShadowSize = 2; 41 const int kTabShadowSize = 2;
42 // The number of pixels the bookmark bar should overlap the spacer by if the
43 // spacer is visible.
44 const int kSpacerBookmarkBarOverlap = 1;
45 // The number of pixels the metro switcher is offset from the right edge. 42 // The number of pixels the metro switcher is offset from the right edge.
46 const int kWindowSwitcherOffsetX = 7; 43 const int kWindowSwitcherOffsetX = 7;
47 // The number of pixels the constrained window should overlap the bottom 44 // The number of pixels the constrained window should overlap the bottom
48 // of the omnibox. 45 // of the omnibox.
49 const int kConstrainedWindowOverlap = 3; 46 const int kConstrainedWindowOverlap = 3;
50 47
51 // Combines View::ConvertPointToTarget and View::HitTest for a given |point|. 48 // Combines View::ConvertPointToTarget and View::HitTest for a given |point|.
52 // Converts |point| from |src| to |dst| and hit tests it against |dst|. The 49 // Converts |point| from |src| to |dst| and hit tests it against |dst|. The
53 // converted |point| can then be retrieved and used for additional tests. 50 // converted |point| can then be retrieved and used for additional tests.
54 bool ConvertedHitTest(views::View* src, views::View* dst, gfx::Point* point) { 51 bool ConvertedHitTest(views::View* src, views::View* dst, gfx::Point* point) {
(...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after
576 return bottom; 573 return bottom;
577 } 574 }
578 575
579 bool BrowserViewLayout::InfobarVisible() const { 576 bool BrowserViewLayout::InfobarVisible() const {
580 // Cast to a views::View to access GetPreferredSize(). 577 // Cast to a views::View to access GetPreferredSize().
581 views::View* infobar_container = infobar_container_; 578 views::View* infobar_container = infobar_container_;
582 // NOTE: Can't check if the size IsEmpty() since it's always 0-width. 579 // NOTE: Can't check if the size IsEmpty() since it's always 0-width.
583 return browser_->SupportsWindowFeature(Browser::FEATURE_INFOBAR) && 580 return browser_->SupportsWindowFeature(Browser::FEATURE_INFOBAR) &&
584 (infobar_container->GetPreferredSize().height() != 0); 581 (infobar_container->GetPreferredSize().height() != 0);
585 } 582 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view.cc ('k') | chrome/browser/ui/views/frame/global_menu_bar_x11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698