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

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

Issue 1478303003: Converted all Views to use an InkDropDelegate instead of a InkDropAnimationController. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added missing include. Created 5 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 public views::DragController, 72 public views::DragController,
73 public gfx::AnimationDelegate, 73 public gfx::AnimationDelegate,
74 public ChromeOmniboxEditController, 74 public ChromeOmniboxEditController,
75 public DropdownBarHostDelegate, 75 public DropdownBarHostDelegate,
76 public TemplateURLServiceObserver, 76 public TemplateURLServiceObserver,
77 public ui_zoom::ZoomEventManagerObserver { 77 public ui_zoom::ZoomEventManagerObserver {
78 public: 78 public:
79 // The location bar view's class name. 79 // The location bar view's class name.
80 static const char kViewClassName[]; 80 static const char kViewClassName[];
81 81
82 // Returns the offset used during dropdown animation.
83 int dropdown_animation_offset() const { return dropdown_animation_offset_; }
84
82 class Delegate { 85 class Delegate {
83 public: 86 public:
84 // Should return the current web contents. 87 // Should return the current web contents.
85 virtual content::WebContents* GetWebContents() = 0; 88 virtual content::WebContents* GetWebContents() = 0;
86 89
87 virtual ToolbarModel* GetToolbarModel() = 0; 90 virtual ToolbarModel* GetToolbarModel() = 0;
88 virtual const ToolbarModel* GetToolbarModel() const = 0; 91 virtual const ToolbarModel* GetToolbarModel() const = 0;
89 92
90 // Creates Widget for the given delegate. 93 // Creates Widget for the given delegate.
91 virtual views::Widget* CreateViewsBubble( 94 virtual views::Widget* CreateViewsBubble(
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 void AnimationProgressed(const gfx::Animation* animation) override; 382 void AnimationProgressed(const gfx::Animation* animation) override;
380 void AnimationEnded(const gfx::Animation* animation) override; 383 void AnimationEnded(const gfx::Animation* animation) override;
381 384
382 // ChromeOmniboxEditController: 385 // ChromeOmniboxEditController:
383 void OnChanged() override; 386 void OnChanged() override;
384 void OnSetFocus() override; 387 void OnSetFocus() override;
385 const ToolbarModel* GetToolbarModel() const override; 388 const ToolbarModel* GetToolbarModel() const override;
386 389
387 // DropdownBarHostDelegate: 390 // DropdownBarHostDelegate:
388 void SetFocusAndSelection(bool select_all) override; 391 void SetFocusAndSelection(bool select_all) override;
392 void SetAnimationOffset(int offset) override;
389 393
390 // TemplateURLServiceObserver: 394 // TemplateURLServiceObserver:
391 void OnTemplateURLServiceChanged() override; 395 void OnTemplateURLServiceChanged() override;
392 396
393 // The Browser this LocationBarView is in. Note that at least 397 // The Browser this LocationBarView is in. Note that at least
394 // chromeos::SimpleWebViewDialog uses a LocationBarView outside any browser 398 // chromeos::SimpleWebViewDialog uses a LocationBarView outside any browser
395 // window, so this may be NULL. 399 // window, so this may be NULL.
396 Browser* browser_; 400 Browser* browser_;
397 401
398 OmniboxViewViews* omnibox_view_; 402 OmniboxViewViews* omnibox_view_;
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
466 // focused. Used when the toolbar is in full keyboard accessibility mode. 470 // focused. Used when the toolbar is in full keyboard accessibility mode.
467 bool show_focus_rect_; 471 bool show_focus_rect_;
468 472
469 // This is in case we're destroyed before the model loads. We need to make 473 // This is in case we're destroyed before the model loads. We need to make
470 // Add/RemoveObserver calls. 474 // Add/RemoveObserver calls.
471 TemplateURLService* template_url_service_; 475 TemplateURLService* template_url_service_;
472 476
473 // Tracks this preference to determine whether bookmark editing is allowed. 477 // Tracks this preference to determine whether bookmark editing is allowed.
474 BooleanPrefMember edit_bookmarks_enabled_; 478 BooleanPrefMember edit_bookmarks_enabled_;
475 479
480 // During dropdown animation, the host clips the widget and draws only the
481 // bottom part of it. The view needs to know the pixel offset at which we are
482 // drawing the widget so that we can draw the curved edges that attach to the
483 // toolbar in the right location.
484 int dropdown_animation_offset_;
485
476 // This is a debug state variable that stores if the WebContents was null 486 // This is a debug state variable that stores if the WebContents was null
477 // during the last RefreshPageAction. 487 // during the last RefreshPageAction.
478 bool web_contents_null_at_last_refresh_; 488 bool web_contents_null_at_last_refresh_;
479 489
480 DISALLOW_COPY_AND_ASSIGN(LocationBarView); 490 DISALLOW_COPY_AND_ASSIGN(LocationBarView);
481 }; 491 };
482 492
483 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ 493 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698