| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/location_bar/location_bar_view.h" | 5 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" |
| 6 | 6 |
| 7 #if defined(TOOLKIT_USES_GTK) | 7 #if defined(TOOLKIT_USES_GTK) |
| 8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
| 9 #endif | 9 #endif |
| 10 | 10 |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 TabContents* GetTabContentsFromDelegate(LocationBarView::Delegate* delegate) { | 75 TabContents* GetTabContentsFromDelegate(LocationBarView::Delegate* delegate) { |
| 76 const TabContentsWrapper* wrapper = delegate->GetTabContentsWrapper(); | 76 const TabContentsWrapper* wrapper = delegate->GetTabContentsWrapper(); |
| 77 return wrapper ? wrapper->tab_contents() : NULL; | 77 return wrapper ? wrapper->tab_contents() : NULL; |
| 78 } | 78 } |
| 79 | 79 |
| 80 } // namespace | 80 } // namespace |
| 81 | 81 |
| 82 // static | 82 // static |
| 83 const int LocationBarView::kNormalHorizontalEdgeThickness = 1; | 83 const int LocationBarView::kNormalHorizontalEdgeThickness = 1; |
| 84 const int LocationBarView::kVerticalEdgeThickness = 2; | 84 const int LocationBarView::kVerticalEdgeThickness = 2; |
| 85 #if defined(TOUCH_UI) | |
| 86 const int LocationBarView::kItemPadding = 10; | |
| 87 #else | |
| 88 const int LocationBarView::kItemPadding = 3; | 85 const int LocationBarView::kItemPadding = 3; |
| 89 #endif | |
| 90 const int LocationBarView::kIconInternalPadding = 2; | 86 const int LocationBarView::kIconInternalPadding = 2; |
| 91 const int LocationBarView::kEdgeItemPadding = kItemPadding; | 87 const int LocationBarView::kEdgeItemPadding = kItemPadding; |
| 92 const int LocationBarView::kBubbleHorizontalPadding = 1; | 88 const int LocationBarView::kBubbleHorizontalPadding = 1; |
| 93 const char LocationBarView::kViewClassName[] = | 89 const char LocationBarView::kViewClassName[] = |
| 94 "browser/ui/views/location_bar/LocationBarView"; | 90 "browser/ui/views/location_bar/LocationBarView"; |
| 95 | 91 |
| 96 static const int kEVBubbleBackgroundImages[] = { | 92 static const int kEVBubbleBackgroundImages[] = { |
| 97 IDR_OMNIBOX_EV_BUBBLE_BACKGROUND_L, | 93 IDR_OMNIBOX_EV_BUBBLE_BACKGROUND_L, |
| 98 IDR_OMNIBOX_EV_BUBBLE_BACKGROUND_C, | 94 IDR_OMNIBOX_EV_BUBBLE_BACKGROUND_C, |
| 99 IDR_OMNIBOX_EV_BUBBLE_BACKGROUND_R, | 95 IDR_OMNIBOX_EV_BUBBLE_BACKGROUND_R, |
| (...skipping 1130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1230 !suggested_text_view_->GetText().empty(); | 1226 !suggested_text_view_->GetText().empty(); |
| 1231 } | 1227 } |
| 1232 | 1228 |
| 1233 #if !defined(USE_AURA) | 1229 #if !defined(USE_AURA) |
| 1234 OmniboxViewWin* LocationBarView::GetOmniboxViewWin() { | 1230 OmniboxViewWin* LocationBarView::GetOmniboxViewWin() { |
| 1235 CHECK(!views::Widget::IsPureViews()); | 1231 CHECK(!views::Widget::IsPureViews()); |
| 1236 return static_cast<OmniboxViewWin*>(location_entry_.get()); | 1232 return static_cast<OmniboxViewWin*>(location_entry_.get()); |
| 1237 } | 1233 } |
| 1238 #endif | 1234 #endif |
| 1239 #endif | 1235 #endif |
| OLD | NEW |