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/gtk/location_bar_view_gtk.h" | 5 #include "chrome/browser/ui/gtk/location_bar_view_gtk.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 #include "ui/base/resource/resource_bundle.h" | 75 #include "ui/base/resource/resource_bundle.h" |
76 #include "ui/gfx/canvas_skia_paint.h" | 76 #include "ui/gfx/canvas_skia_paint.h" |
77 #include "ui/gfx/font.h" | 77 #include "ui/gfx/font.h" |
78 #include "ui/gfx/gtk_util.h" | 78 #include "ui/gfx/gtk_util.h" |
79 #include "ui/gfx/image/image.h" | 79 #include "ui/gfx/image/image.h" |
80 #include "webkit/glue/window_open_disposition.h" | 80 #include "webkit/glue/window_open_disposition.h" |
81 | 81 |
82 using content::NavigationEntry; | 82 using content::NavigationEntry; |
83 using content::OpenURLParams; | 83 using content::OpenURLParams; |
84 using content::WebContents; | 84 using content::WebContents; |
| 85 using extensions::Extension; |
85 | 86 |
86 namespace { | 87 namespace { |
87 | 88 |
88 // We are positioned with a little bit of extra space that we don't use now. | 89 // We are positioned with a little bit of extra space that we don't use now. |
89 const int kTopMargin = 1; | 90 const int kTopMargin = 1; |
90 const int kBottomMargin = 1; | 91 const int kBottomMargin = 1; |
91 const int kLeftMargin = 1; | 92 const int kLeftMargin = 1; |
92 const int kRightMargin = 1; | 93 const int kRightMargin = 1; |
93 // We draw a border on the top and bottom (but not on left or right). | 94 // We draw a border on the top and bottom (but not on left or right). |
94 const int kBorderThickness = 1; | 95 const int kBorderThickness = 1; |
(...skipping 1710 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1805 GdkModifierType modifier, | 1806 GdkModifierType modifier, |
1806 void* user_data) { | 1807 void* user_data) { |
1807 PageActionViewGtk* view = static_cast<PageActionViewGtk*>(user_data); | 1808 PageActionViewGtk* view = static_cast<PageActionViewGtk*>(user_data); |
1808 if (!gtk_widget_get_visible(view->widget())) | 1809 if (!gtk_widget_get_visible(view->widget())) |
1809 return FALSE; | 1810 return FALSE; |
1810 | 1811 |
1811 GdkEventButton event = {}; | 1812 GdkEventButton event = {}; |
1812 event.button = 1; | 1813 event.button = 1; |
1813 return view->OnButtonPressed(view->widget(), &event); | 1814 return view->OnButtonPressed(view->widget(), &event); |
1814 } | 1815 } |
OLD | NEW |