OLD | NEW |
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/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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 #include "ui/base/accessibility/accessible_view_state.h" | 51 #include "ui/base/accessibility/accessible_view_state.h" |
52 #include "ui/base/dragdrop/drag_drop_types.h" | 52 #include "ui/base/dragdrop/drag_drop_types.h" |
53 #include "ui/base/l10n/l10n_util.h" | 53 #include "ui/base/l10n/l10n_util.h" |
54 #include "ui/base/resource/resource_bundle.h" | 54 #include "ui/base/resource/resource_bundle.h" |
55 #include "ui/base/theme_provider.h" | 55 #include "ui/base/theme_provider.h" |
56 #include "ui/gfx/canvas_skia.h" | 56 #include "ui/gfx/canvas_skia.h" |
57 #include "ui/gfx/color_utils.h" | 57 #include "ui/gfx/color_utils.h" |
58 #include "ui/gfx/image/image.h" | 58 #include "ui/gfx/image/image.h" |
59 #include "ui/gfx/skia_util.h" | 59 #include "ui/gfx/skia_util.h" |
60 #include "ui/views/controls/label.h" | 60 #include "ui/views/controls/label.h" |
61 #include "ui/views/drag_utils.h" | 61 #include "ui/views/button_drag_utils.h" |
62 | 62 |
63 #if !defined(OS_CHROMEOS) | 63 #if !defined(OS_CHROMEOS) |
64 #include "chrome/browser/ui/views/first_run_bubble.h" | 64 #include "chrome/browser/ui/views/first_run_bubble.h" |
65 #endif | 65 #endif |
66 | 66 |
67 #if defined(OS_WIN) || defined(USE_AURA) | 67 #if defined(OS_WIN) || defined(USE_AURA) |
68 #include "chrome/browser/ui/views/location_bar/suggested_text_view.h" | 68 #include "chrome/browser/ui/views/location_bar/suggested_text_view.h" |
69 #endif | 69 #endif |
70 | 70 |
71 using content::WebContents; | 71 using content::WebContents; |
(...skipping 988 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1060 } | 1060 } |
1061 | 1061 |
1062 void LocationBarView::WriteDragDataForView(views::View* sender, | 1062 void LocationBarView::WriteDragDataForView(views::View* sender, |
1063 const gfx::Point& press_pt, | 1063 const gfx::Point& press_pt, |
1064 OSExchangeData* data) { | 1064 OSExchangeData* data) { |
1065 DCHECK_NE(GetDragOperationsForView(sender, press_pt), | 1065 DCHECK_NE(GetDragOperationsForView(sender, press_pt), |
1066 ui::DragDropTypes::DRAG_NONE); | 1066 ui::DragDropTypes::DRAG_NONE); |
1067 | 1067 |
1068 TabContentsWrapper* tab_contents = delegate_->GetTabContentsWrapper(); | 1068 TabContentsWrapper* tab_contents = delegate_->GetTabContentsWrapper(); |
1069 DCHECK(tab_contents); | 1069 DCHECK(tab_contents); |
1070 drag_utils::SetURLAndDragImage( | 1070 button_drag_utils::SetURLAndDragImage( |
1071 tab_contents->web_contents()->GetURL(), | 1071 tab_contents->web_contents()->GetURL(), |
1072 tab_contents->web_contents()->GetTitle(), | 1072 tab_contents->web_contents()->GetTitle(), |
1073 tab_contents->favicon_tab_helper()->GetFavicon(), | 1073 tab_contents->favicon_tab_helper()->GetFavicon(), |
1074 data); | 1074 data); |
1075 } | 1075 } |
1076 | 1076 |
1077 int LocationBarView::GetDragOperationsForView(views::View* sender, | 1077 int LocationBarView::GetDragOperationsForView(views::View* sender, |
1078 const gfx::Point& p) { | 1078 const gfx::Point& p) { |
1079 DCHECK((sender == location_icon_view_) || (sender == ev_bubble_view_)); | 1079 DCHECK((sender == location_icon_view_) || (sender == ev_bubble_view_)); |
1080 WebContents* web_contents = GetWebContentsFromDelegate(delegate_); | 1080 WebContents* web_contents = GetWebContentsFromDelegate(delegate_); |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1236 !suggested_text_view_->GetText().empty(); | 1236 !suggested_text_view_->GetText().empty(); |
1237 } | 1237 } |
1238 | 1238 |
1239 #if !defined(USE_AURA) | 1239 #if !defined(USE_AURA) |
1240 OmniboxViewWin* LocationBarView::GetOmniboxViewWin() { | 1240 OmniboxViewWin* LocationBarView::GetOmniboxViewWin() { |
1241 CHECK(!views::Widget::IsPureViews()); | 1241 CHECK(!views::Widget::IsPureViews()); |
1242 return static_cast<OmniboxViewWin*>(location_entry_.get()); | 1242 return static_cast<OmniboxViewWin*>(location_entry_.get()); |
1243 } | 1243 } |
1244 #endif | 1244 #endif |
1245 #endif | 1245 #endif |
OLD | NEW |