| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 #ifndef CHROME_BROWSER_VIEWS_LOCATION_BAR_VIEW_H__ | 5 #ifndef CHROME_BROWSER_VIEWS_LOCATION_BAR_VIEW_H__ |
| 6 #define CHROME_BROWSER_VIEWS_LOCATION_BAR_VIEW_H__ | 6 #define CHROME_BROWSER_VIEWS_LOCATION_BAR_VIEW_H__ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/gfx/rect.h" | 10 #include "base/gfx/rect.h" |
| (...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 276 | 276 |
| 277 DISALLOW_EVIL_CONSTRUCTORS(SecurityImageView); | 277 DISALLOW_EVIL_CONSTRUCTORS(SecurityImageView); |
| 278 }; | 278 }; |
| 279 | 279 |
| 280 // Both Layout and OnChanged call into this. This updates the contents | 280 // Both Layout and OnChanged call into this. This updates the contents |
| 281 // of the 3 views: selected_keyword, keyword_hint and type_search_view. If | 281 // of the 3 views: selected_keyword, keyword_hint and type_search_view. If |
| 282 // force_layout is true, or one of these views has changed in such a way as | 282 // force_layout is true, or one of these views has changed in such a way as |
| 283 // to necessitate a layout, layout occurs as well. | 283 // to necessitate a layout, layout occurs as well. |
| 284 void DoLayout(bool force_layout); | 284 void DoLayout(bool force_layout); |
| 285 | 285 |
| 286 // Returns the number of pixels to clip off the top edge of the background | 286 // Returns the height in pixels of the margin at the top of the bar. |
| 287 // graphics. With the Vista frame, the DWM draws a dark border around the | |
| 288 // content, so we clip the single dark pixel on the popup background image, | |
| 289 // which otherwise looks redundant. | |
| 290 int TopOffset() const; | |
| 291 | |
| 292 // Returns the height in pixels of the margin at the top of the bar, after | |
| 293 // TopOffset() pixels have been clipped off. | |
| 294 int TopMargin() const; | 287 int TopMargin() const; |
| 295 | 288 |
| 296 // Returns the width in pixels of the contents of the edit. | 289 // Returns the width in pixels of the contents of the edit. |
| 297 int TextDisplayWidth(); | 290 int TextDisplayWidth(); |
| 298 | 291 |
| 299 // Returns true if the preferred size should be used for a view whose width | 292 // Returns true if the preferred size should be used for a view whose width |
| 300 // is pref_width, the width of the text in the edit is text_width, and | 293 // is pref_width, the width of the text in the edit is text_width, and |
| 301 // max_width is the maximum width of the edit. If this returns false, the | 294 // max_width is the maximum width of the edit. If this returns false, the |
| 302 // minimum size of the view should be used. | 295 // minimum size of the view should be used. |
| 303 bool UsePref(int pref_width, int text_width, int max_width); | 296 bool UsePref(int pref_width, int text_width, int max_width); |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 392 // When true, the location bar view is read only and also is has a slightly | 385 // When true, the location bar view is read only and also is has a slightly |
| 393 // different presentation (font size / color). This is used for popups. | 386 // different presentation (font size / color). This is used for popups. |
| 394 bool popup_window_mode_; | 387 bool popup_window_mode_; |
| 395 | 388 |
| 396 // Used schedule a task for the first run info bubble. | 389 // Used schedule a task for the first run info bubble. |
| 397 ScopedRunnableMethodFactory<LocationBarView> first_run_bubble_; | 390 ScopedRunnableMethodFactory<LocationBarView> first_run_bubble_; |
| 398 }; | 391 }; |
| 399 | 392 |
| 400 #endif // CHROME_BROWSER_VIEWS_LOCATION_BAR_VIEW_H__ | 393 #endif // CHROME_BROWSER_VIEWS_LOCATION_BAR_VIEW_H__ |
| 401 | 394 |
| OLD | NEW |