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 #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 <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
247 ToolbarModel* GetToolbarModel() override; | 247 ToolbarModel* GetToolbarModel() override; |
248 content::WebContents* GetWebContents() override; | 248 content::WebContents* GetWebContents() override; |
249 | 249 |
250 // ZoomEventManagerObserver: | 250 // ZoomEventManagerObserver: |
251 // Updates the view for the zoom icon when default zoom levels change. | 251 // Updates the view for the zoom icon when default zoom levels change. |
252 void OnDefaultZoomLevelChanged() override; | 252 void OnDefaultZoomLevelChanged() override; |
253 | 253 |
254 private: | 254 private: |
255 using ContentSettingViews = std::vector<ContentSettingImageView*>; | 255 using ContentSettingViews = std::vector<ContentSettingImageView*>; |
256 | 256 |
257 friend class ContentSettingBubbleDialogTest; | |
257 friend class PageActionImageView; | 258 friend class PageActionImageView; |
258 friend class PageActionWithBadgeView; | 259 friend class PageActionWithBadgeView; |
259 using PageActions = std::vector<ExtensionAction*>; | 260 using PageActions = std::vector<ExtensionAction*>; |
260 using PageActionViews = std::vector<std::unique_ptr<PageActionWithBadgeView>>; | 261 using PageActionViews = std::vector<std::unique_ptr<PageActionWithBadgeView>>; |
261 | 262 |
262 // Helper for GetMinimumWidth(). Calculates the incremental minimum width | 263 // Helper for GetMinimumWidth(). Calculates the incremental minimum width |
263 // |view| should add to the trailing width after the omnibox. | 264 // |view| should add to the trailing width after the omnibox. |
264 int IncrementalMinimumWidth(views::View* view) const; | 265 int IncrementalMinimumWidth(views::View* view) const; |
265 | 266 |
266 // Returns the thickness of any visible edge, in pixels. | 267 // Returns the thickness of any visible edge, in pixels. |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
354 const OmniboxView* GetOmniboxView() const override; | 355 const OmniboxView* GetOmniboxView() const override; |
355 LocationBarTesting* GetLocationBarForTesting() override; | 356 LocationBarTesting* GetLocationBarForTesting() override; |
356 | 357 |
357 // LocationBarTesting: | 358 // LocationBarTesting: |
358 int PageActionCount() override; | 359 int PageActionCount() override; |
359 int PageActionVisibleCount() override; | 360 int PageActionVisibleCount() override; |
360 ExtensionAction* GetPageAction(size_t index) override; | 361 ExtensionAction* GetPageAction(size_t index) override; |
361 ExtensionAction* GetVisiblePageAction(size_t index) override; | 362 ExtensionAction* GetVisiblePageAction(size_t index) override; |
362 void TestPageActionPressed(size_t index) override; | 363 void TestPageActionPressed(size_t index) override; |
363 bool GetBookmarkStarVisibility() override; | 364 bool GetBookmarkStarVisibility() override; |
365 int ContentSettingImageModelCount() override; | |
366 ContentSettingImageModel* GetContentSettingImageModel(size_t index) override; | |
364 | 367 |
365 // views::View: | 368 // views::View: |
366 const char* GetClassName() const override; | 369 const char* GetClassName() const override; |
367 void OnBoundsChanged(const gfx::Rect& previous_bounds) override; | 370 void OnBoundsChanged(const gfx::Rect& previous_bounds) override; |
368 void OnFocus() override; | 371 void OnFocus() override; |
369 void OnPaint(gfx::Canvas* canvas) override; | 372 void OnPaint(gfx::Canvas* canvas) override; |
370 void OnPaintBorder(gfx::Canvas* canvas) override; | 373 void OnPaintBorder(gfx::Canvas* canvas) override; |
371 | 374 |
372 // views::DragController: | 375 // views::DragController: |
373 void WriteDragDataForView(View* sender, | 376 void WriteDragDataForView(View* sender, |
(...skipping 11 matching lines...) Expand all Loading... | |
385 // ChromeOmniboxEditController: | 388 // ChromeOmniboxEditController: |
386 void OnChanged() override; | 389 void OnChanged() override; |
387 const ToolbarModel* GetToolbarModel() const override; | 390 const ToolbarModel* GetToolbarModel() const override; |
388 | 391 |
389 // DropdownBarHostDelegate: | 392 // DropdownBarHostDelegate: |
390 void SetFocusAndSelection(bool select_all) override; | 393 void SetFocusAndSelection(bool select_all) override; |
391 | 394 |
392 // TemplateURLServiceObserver: | 395 // TemplateURLServiceObserver: |
393 void OnTemplateURLServiceChanged() override; | 396 void OnTemplateURLServiceChanged() override; |
394 | 397 |
398 // For a given ContentSettingImageModel, return the corresponding | |
399 // ContentSettingImageView. | |
400 ContentSettingImageView* GetContentSettingImageViewFromImageModel( | |
401 ContentSettingImageModel* image_model); | |
Peter Kasting
2017/02/06 21:14:25
Nit: Following convention in this file, place non-
| |
402 | |
395 // The Browser this LocationBarView is in. Note that at least | 403 // The Browser this LocationBarView is in. Note that at least |
396 // chromeos::SimpleWebViewDialog uses a LocationBarView outside any browser | 404 // chromeos::SimpleWebViewDialog uses a LocationBarView outside any browser |
397 // window, so this may be NULL. | 405 // window, so this may be NULL. |
398 Browser* browser_; | 406 Browser* browser_; |
399 | 407 |
400 OmniboxViewViews* omnibox_view_; | 408 OmniboxViewViews* omnibox_view_; |
401 | 409 |
402 // Our delegate. | 410 // Our delegate. |
403 Delegate* delegate_; | 411 Delegate* delegate_; |
404 | 412 |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
464 BooleanPrefMember edit_bookmarks_enabled_; | 472 BooleanPrefMember edit_bookmarks_enabled_; |
465 | 473 |
466 // This is a debug state variable that stores if the WebContents was null | 474 // This is a debug state variable that stores if the WebContents was null |
467 // during the last RefreshPageAction. | 475 // during the last RefreshPageAction. |
468 bool web_contents_null_at_last_refresh_; | 476 bool web_contents_null_at_last_refresh_; |
469 | 477 |
470 DISALLOW_COPY_AND_ASSIGN(LocationBarView); | 478 DISALLOW_COPY_AND_ASSIGN(LocationBarView); |
471 }; | 479 }; |
472 | 480 |
473 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ | 481 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ |
OLD | NEW |