| 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 <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
| 12 #include "base/memory/weak_ptr.h" |
| 12 #include "base/prefs/pref_member.h" | 13 #include "base/prefs/pref_member.h" |
| 13 #include "chrome/browser/extensions/extension_context_menu_model.h" | 14 #include "chrome/browser/extensions/extension_context_menu_model.h" |
| 14 #include "chrome/browser/search_engines/template_url_service_observer.h" | 15 #include "chrome/browser/search_engines/template_url_service_observer.h" |
| 15 #include "chrome/browser/ui/omnibox/location_bar.h" | 16 #include "chrome/browser/ui/omnibox/location_bar.h" |
| 16 #include "chrome/browser/ui/omnibox/omnibox_edit_controller.h" | 17 #include "chrome/browser/ui/omnibox/omnibox_edit_controller.h" |
| 17 #include "chrome/browser/ui/search/search_model_observer.h" | 18 #include "chrome/browser/ui/search/search_model_observer.h" |
| 18 #include "chrome/browser/ui/toolbar/toolbar_model.h" | 19 #include "chrome/browser/ui/toolbar/toolbar_model.h" |
| 19 #include "chrome/browser/ui/views/dropdown_bar_host.h" | 20 #include "chrome/browser/ui/views/dropdown_bar_host.h" |
| 20 #include "chrome/browser/ui/views/dropdown_bar_host_delegate.h" | 21 #include "chrome/browser/ui/views/dropdown_bar_host_delegate.h" |
| 21 #include "chrome/browser/ui/views/extensions/extension_popup.h" | 22 #include "chrome/browser/ui/views/extensions/extension_popup.h" |
| (...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 415 // Returns true if the suggest text is valid. | 416 // Returns true if the suggest text is valid. |
| 416 bool HasValidSuggestText() const; | 417 bool HasValidSuggestText() const; |
| 417 | 418 |
| 418 // Helper to show the first run info bubble. | 419 // Helper to show the first run info bubble. |
| 419 void ShowFirstRunBubbleInternal(); | 420 void ShowFirstRunBubbleInternal(); |
| 420 | 421 |
| 421 // Draw backgrounds and borders for page actions. Must be called | 422 // Draw backgrounds and borders for page actions. Must be called |
| 422 // after layout, so the |page_action_views_| have their bounds. | 423 // after layout, so the |page_action_views_| have their bounds. |
| 423 void PaintPageActionBackgrounds(gfx::Canvas* canvas); | 424 void PaintPageActionBackgrounds(gfx::Canvas* canvas); |
| 424 | 425 |
| 426 // Handles a request to change the value of this text field from software |
| 427 // using an accessibility API (typically automation software, screen readers |
| 428 // don't normally use this). Sets the value and clears the selection. |
| 429 void AccessibilitySetValue(const string16& new_value); |
| 430 |
| 425 // The Browser this LocationBarView is in. Note that at least | 431 // The Browser this LocationBarView is in. Note that at least |
| 426 // chromeos::SimpleWebViewDialog uses a LocationBarView outside any browser | 432 // chromeos::SimpleWebViewDialog uses a LocationBarView outside any browser |
| 427 // window, so this may be NULL. | 433 // window, so this may be NULL. |
| 428 Browser* browser_; | 434 Browser* browser_; |
| 429 | 435 |
| 430 // The Autocomplete Edit field. | 436 // The Autocomplete Edit field. |
| 431 scoped_ptr<OmniboxView> location_entry_; | 437 scoped_ptr<OmniboxView> location_entry_; |
| 432 | 438 |
| 433 // The profile which corresponds to this View. | 439 // The profile which corresponds to this View. |
| 434 Profile* profile_; | 440 Profile* profile_; |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 527 | 533 |
| 528 // While animating, the host clips the widget and draws only the bottom | 534 // While animating, the host clips the widget and draws only the bottom |
| 529 // part of it. The view needs to know the pixel offset at which we are drawing | 535 // part of it. The view needs to know the pixel offset at which we are drawing |
| 530 // the widget so that we can draw the curved edges that attach to the toolbar | 536 // the widget so that we can draw the curved edges that attach to the toolbar |
| 531 // in the right location. | 537 // in the right location. |
| 532 int animation_offset_; | 538 int animation_offset_; |
| 533 | 539 |
| 534 // Used to register for notifications received by NotificationObserver. | 540 // Used to register for notifications received by NotificationObserver. |
| 535 content::NotificationRegistrar registrar_; | 541 content::NotificationRegistrar registrar_; |
| 536 | 542 |
| 543 // Used to bind callback functions to this object. |
| 544 base::WeakPtrFactory<LocationBarView> weak_ptr_factory_; |
| 545 |
| 537 DISALLOW_COPY_AND_ASSIGN(LocationBarView); | 546 DISALLOW_COPY_AND_ASSIGN(LocationBarView); |
| 538 }; | 547 }; |
| 539 | 548 |
| 540 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ | 549 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ |
| OLD | NEW |