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

Side by Side Diff: chrome/browser/ui/views/location_bar/location_bar_view.cc

Issue 6204002: Carnitas: Remove chrome/browser/views, update references. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Retrying upload after AppEngine error Created 9 years, 11 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) 2010 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/views/location_bar/location_bar_view.h" 5 #include "chrome/browser/ui/views/location_bar/location_bar_view.h"
6 6
7 #if defined(OS_LINUX) 7 #if defined(OS_LINUX)
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 #endif 9 #endif
10 10
11 #include "app/drag_drop_types.h" 11 #include "app/drag_drop_types.h"
12 #include "app/l10n_util.h" 12 #include "app/l10n_util.h"
13 #include "app/resource_bundle.h" 13 #include "app/resource_bundle.h"
14 #include "app/theme_provider.h" 14 #include "app/theme_provider.h"
15 #include "base/stl_util-inl.h" 15 #include "base/stl_util-inl.h"
(...skipping 24 matching lines...) Expand all
40 #include "gfx/canvas_skia.h" 40 #include "gfx/canvas_skia.h"
41 #include "gfx/color_utils.h" 41 #include "gfx/color_utils.h"
42 #include "gfx/skia_util.h" 42 #include "gfx/skia_util.h"
43 #include "grit/generated_resources.h" 43 #include "grit/generated_resources.h"
44 #include "grit/theme_resources.h" 44 #include "grit/theme_resources.h"
45 #include "views/controls/label.h" 45 #include "views/controls/label.h"
46 #include "views/drag_utils.h" 46 #include "views/drag_utils.h"
47 47
48 #if defined(OS_WIN) 48 #if defined(OS_WIN)
49 #include "chrome/browser/ui/views/location_bar/suggested_text_view.h" 49 #include "chrome/browser/ui/views/location_bar/suggested_text_view.h"
50 #include "chrome/browser/views/first_run_bubble.h" 50 #include "chrome/browser/ui/views/first_run_bubble.h"
51 #endif 51 #endif
52 52
53 using views::View; 53 using views::View;
54 54
55 namespace { 55 namespace {
56 TabContents* GetTabContentsFromDelegate(LocationBarView::Delegate* delegate) { 56 TabContents* GetTabContentsFromDelegate(LocationBarView::Delegate* delegate) {
57 const TabContentsWrapper* wrapper = delegate->GetTabContentsWrapper(); 57 const TabContentsWrapper* wrapper = delegate->GetTabContentsWrapper();
58 return wrapper ? wrapper->tab_contents() : NULL; 58 return wrapper ? wrapper->tab_contents() : NULL;
59 } 59 }
60 } // namespace 60 } // namespace
61 61
62 // static 62 // static
63 const int LocationBarView::kNormalHorizontalEdgeThickness = 1; 63 const int LocationBarView::kNormalHorizontalEdgeThickness = 1;
64 const int LocationBarView::kVerticalEdgeThickness = 2; 64 const int LocationBarView::kVerticalEdgeThickness = 2;
65 const int LocationBarView::kItemPadding = 3; 65 const int LocationBarView::kItemPadding = 3;
66 const int LocationBarView::kExtensionItemPadding = 5; 66 const int LocationBarView::kExtensionItemPadding = 5;
67 const int LocationBarView::kEdgeItemPadding = kItemPadding; 67 const int LocationBarView::kEdgeItemPadding = kItemPadding;
68 const int LocationBarView::kBubblePadding = 1; 68 const int LocationBarView::kBubblePadding = 1;
69 const char LocationBarView::kViewClassName[] = 69 const char LocationBarView::kViewClassName[] =
70 "browser/views/location_bar/LocationBarView"; 70 "browser/ui/views/location_bar/LocationBarView";
71 71
72 static const int kEVBubbleBackgroundImages[] = { 72 static const int kEVBubbleBackgroundImages[] = {
73 IDR_OMNIBOX_EV_BUBBLE_BACKGROUND_L, 73 IDR_OMNIBOX_EV_BUBBLE_BACKGROUND_L,
74 IDR_OMNIBOX_EV_BUBBLE_BACKGROUND_C, 74 IDR_OMNIBOX_EV_BUBBLE_BACKGROUND_C,
75 IDR_OMNIBOX_EV_BUBBLE_BACKGROUND_R, 75 IDR_OMNIBOX_EV_BUBBLE_BACKGROUND_R,
76 }; 76 };
77 77
78 static const int kSelectedKeywordBackgroundImages[] = { 78 static const int kSelectedKeywordBackgroundImages[] = {
79 IDR_LOCATION_BAR_SELECTED_KEYWORD_BACKGROUND_L, 79 IDR_LOCATION_BAR_SELECTED_KEYWORD_BACKGROUND_L,
80 IDR_LOCATION_BAR_SELECTED_KEYWORD_BACKGROUND_C, 80 IDR_LOCATION_BAR_SELECTED_KEYWORD_BACKGROUND_C,
(...skipping 1182 matching lines...) Expand 10 before | Expand all | Expand 10 after
1263 template_url_model_ = NULL; 1263 template_url_model_ = NULL;
1264 ShowFirstRunBubble(bubble_type_); 1264 ShowFirstRunBubble(bubble_type_);
1265 } 1265 }
1266 1266
1267 #if defined(OS_WIN) 1267 #if defined(OS_WIN)
1268 bool LocationBarView::HasValidSuggestText() { 1268 bool LocationBarView::HasValidSuggestText() {
1269 return suggested_text_view_ && !suggested_text_view_->size().IsEmpty() && 1269 return suggested_text_view_ && !suggested_text_view_->size().IsEmpty() &&
1270 !suggested_text_view_->GetText().empty(); 1270 !suggested_text_view_->GetText().empty();
1271 } 1271 }
1272 #endif 1272 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698