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

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

Issue 11648024: Clean-up positioning and spacing in chrome/browser/ui/views/location_bar/location_bar_view.cc (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years 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
OLDNEW
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 #ifndef CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ 6 #define CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 protected: 345 protected:
346 virtual void OnFocus() OVERRIDE; 346 virtual void OnFocus() OVERRIDE;
347 347
348 private: 348 private:
349 typedef std::vector<ContentSettingImageView*> ContentSettingViews; 349 typedef std::vector<ContentSettingImageView*> ContentSettingViews;
350 350
351 friend class PageActionImageView; 351 friend class PageActionImageView;
352 friend class PageActionWithBadgeView; 352 friend class PageActionWithBadgeView;
353 typedef std::vector<PageActionWithBadgeView*> PageActionViews; 353 typedef std::vector<PageActionWithBadgeView*> PageActionViews;
354 354
355 // Returns the amount of horizontal space (in pixels) out of
356 // |location_bar_width| that is not taken up by the actual text in
357 // location_entry_.
358 int AvailableWidth(int location_bar_width);
359
360 // If |view| fits in |available_width|, it is made visible and positioned at
361 // the leading or trailing end of |bounds|, which are then shrunk
362 // appropriately. Otherwise |view| is made invisible.
363 // Note: |view| is expected to have already been positioned and sized
364 // vertically.
365 void LayoutView(views::View* view,
366 int padding,
367 int available_width,
368 bool leading,
369 gfx::Rect* bounds);
370
371 // Update the visibility state of the Content Blocked icons to reflect what is 355 // Update the visibility state of the Content Blocked icons to reflect what is
372 // actually blocked on the current page. 356 // actually blocked on the current page.
373 void RefreshContentSettingViews(); 357 void RefreshContentSettingViews();
374 358
375 // Delete all page action views that we have created. 359 // Delete all page action views that we have created.
376 void DeletePageActionViews(); 360 void DeletePageActionViews();
377 361
378 // Update the views for the Page Actions, to reflect state changes for 362 // Update the views for the Page Actions, to reflect state changes for
379 // PageActions. 363 // PageActions.
380 void RefreshPageActionViews(); 364 void RefreshPageActionViews();
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
515 // in the right location. 499 // in the right location.
516 int animation_offset_; 500 int animation_offset_;
517 501
518 // Used to register for notifications received by NotificationObserver. 502 // Used to register for notifications received by NotificationObserver.
519 content::NotificationRegistrar registrar_; 503 content::NotificationRegistrar registrar_;
520 504
521 DISALLOW_IMPLICIT_CONSTRUCTORS(LocationBarView); 505 DISALLOW_IMPLICIT_CONSTRUCTORS(LocationBarView);
522 }; 506 };
523 507
524 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ 508 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698