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

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

Issue 1428423002: Remove setVoiceSearchSupported part of EmbeddedSearch SearchBox API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "base/prefs/pref_member.h" 12 #include "base/prefs/pref_member.h"
13 #include "chrome/browser/extensions/extension_context_menu_model.h" 13 #include "chrome/browser/extensions/extension_context_menu_model.h"
14 #include "chrome/browser/ssl/security_state_model.h" 14 #include "chrome/browser/ssl/security_state_model.h"
15 #include "chrome/browser/ui/location_bar/location_bar.h" 15 #include "chrome/browser/ui/location_bar/location_bar.h"
16 #include "chrome/browser/ui/omnibox/chrome_omnibox_edit_controller.h" 16 #include "chrome/browser/ui/omnibox/chrome_omnibox_edit_controller.h"
17 #include "chrome/browser/ui/search/search_model_observer.h"
18 #include "chrome/browser/ui/toolbar/chrome_toolbar_model.h" 17 #include "chrome/browser/ui/toolbar/chrome_toolbar_model.h"
19 #include "chrome/browser/ui/views/dropdown_bar_host.h" 18 #include "chrome/browser/ui/views/dropdown_bar_host.h"
20 #include "chrome/browser/ui/views/dropdown_bar_host_delegate.h" 19 #include "chrome/browser/ui/views/dropdown_bar_host_delegate.h"
21 #include "chrome/browser/ui/views/extensions/extension_popup.h" 20 #include "chrome/browser/ui/views/extensions/extension_popup.h"
22 #include "chrome/browser/ui/views/omnibox/omnibox_view_views.h" 21 #include "chrome/browser/ui/views/omnibox/omnibox_view_views.h"
23 #include "components/search_engines/template_url_service_observer.h" 22 #include "components/search_engines/template_url_service_observer.h"
24 #include "components/ui/zoom/zoom_event_manager_observer.h" 23 #include "components/ui/zoom/zoom_event_manager_observer.h"
25 #include "ui/gfx/animation/animation_delegate.h" 24 #include "ui/gfx/animation/animation_delegate.h"
26 #include "ui/gfx/animation/slide_animation.h" 25 #include "ui/gfx/animation/slide_animation.h"
27 #include "ui/gfx/font.h" 26 #include "ui/gfx/font.h"
28 #include "ui/gfx/geometry/rect.h" 27 #include "ui/gfx/geometry/rect.h"
29 #include "ui/views/controls/button/button.h"
30 #include "ui/views/drag_controller.h" 28 #include "ui/views/drag_controller.h"
31 29
32 class ActionBoxButtonView; 30 class ActionBoxButtonView;
33 class CommandUpdater; 31 class CommandUpdater;
34 class ContentSettingBubbleModelDelegate; 32 class ContentSettingBubbleModelDelegate;
35 class ContentSettingImageView; 33 class ContentSettingImageView;
36 class EVBubbleView; 34 class EVBubbleView;
37 class ExtensionAction; 35 class ExtensionAction;
38 class GURL; 36 class GURL;
39 class InstantController; 37 class InstantController;
40 class KeywordHintView; 38 class KeywordHintView;
41 class LocationIconView; 39 class LocationIconView;
42 class OpenPDFInReaderView; 40 class OpenPDFInReaderView;
43 class ManagePasswordsIconViews; 41 class ManagePasswordsIconViews;
44 class PageActionWithBadgeView; 42 class PageActionWithBadgeView;
45 class PageActionImageView; 43 class PageActionImageView;
46 class Profile; 44 class Profile;
47 class SelectedKeywordView; 45 class SelectedKeywordView;
48 class StarView; 46 class StarView;
49 class TemplateURLService; 47 class TemplateURLService;
50 class TranslateIconView; 48 class TranslateIconView;
51 class ZoomView; 49 class ZoomView;
52 50
53 namespace autofill { 51 namespace autofill {
54 class SaveCardIconView; 52 class SaveCardIconView;
55 } 53 }
56 54
57 namespace views { 55 namespace views {
58 class BubbleDelegateView; 56 class BubbleDelegateView;
59 class ImageButton; 57 class ImageButton;
msw 2015/11/06 23:59:23 nit: remove
Evan Stade 2015/11/07 00:43:03 Done.
60 class ImageView; 58 class ImageView;
msw 2015/11/06 23:59:23 nit: remove
Evan Stade 2015/11/07 00:43:03 Done.
61 class Label; 59 class Label;
62 class Widget; 60 class Widget;
63 } 61 }
64 62
65 ///////////////////////////////////////////////////////////////////////////// 63 /////////////////////////////////////////////////////////////////////////////
66 // 64 //
67 // LocationBarView class 65 // LocationBarView class
68 // 66 //
69 // The LocationBarView class is a View subclass that paints the background 67 // The LocationBarView class is a View subclass that paints the background
70 // of the URL bar strip and contains its content. 68 // of the URL bar strip and contains its content.
71 // 69 //
72 ///////////////////////////////////////////////////////////////////////////// 70 /////////////////////////////////////////////////////////////////////////////
73 class LocationBarView : public LocationBar, 71 class LocationBarView : public LocationBar,
74 public LocationBarTesting, 72 public LocationBarTesting,
75 public views::View, 73 public views::View,
76 public views::ButtonListener,
77 public views::DragController, 74 public views::DragController,
78 public gfx::AnimationDelegate, 75 public gfx::AnimationDelegate,
79 public ChromeOmniboxEditController, 76 public ChromeOmniboxEditController,
80 public DropdownBarHostDelegate, 77 public DropdownBarHostDelegate,
81 public TemplateURLServiceObserver, 78 public TemplateURLServiceObserver,
82 public SearchModelObserver,
83 public ui_zoom::ZoomEventManagerObserver { 79 public ui_zoom::ZoomEventManagerObserver {
84 public: 80 public:
85 // The location bar view's class name. 81 // The location bar view's class name.
86 static const char kViewClassName[]; 82 static const char kViewClassName[];
87 83
88 // Returns the offset used during dropdown animation. 84 // Returns the offset used during dropdown animation.
89 int dropdown_animation_offset() const { return dropdown_animation_offset_; } 85 int dropdown_animation_offset() const { return dropdown_animation_offset_; }
90 86
91 class Delegate { 87 class Delegate {
92 public: 88 public:
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 void TestPageActionPressed(size_t index) override; 363 void TestPageActionPressed(size_t index) override;
368 bool GetBookmarkStarVisibility() override; 364 bool GetBookmarkStarVisibility() override;
369 365
370 // views::View: 366 // views::View:
371 const char* GetClassName() const override; 367 const char* GetClassName() const override;
372 void OnBoundsChanged(const gfx::Rect& previous_bounds) override; 368 void OnBoundsChanged(const gfx::Rect& previous_bounds) override;
373 void OnFocus() override; 369 void OnFocus() override;
374 void OnPaint(gfx::Canvas* canvas) override; 370 void OnPaint(gfx::Canvas* canvas) override;
375 void PaintChildren(const ui::PaintContext& context) override; 371 void PaintChildren(const ui::PaintContext& context) override;
376 372
377 // views::ButtonListener:
378 void ButtonPressed(views::Button* sender, const ui::Event& event) override;
379
380 // views::DragController: 373 // views::DragController:
381 void WriteDragDataForView(View* sender, 374 void WriteDragDataForView(View* sender,
382 const gfx::Point& press_pt, 375 const gfx::Point& press_pt,
383 OSExchangeData* data) override; 376 OSExchangeData* data) override;
384 int GetDragOperationsForView(View* sender, const gfx::Point& p) override; 377 int GetDragOperationsForView(View* sender, const gfx::Point& p) override;
385 bool CanStartDragForView(View* sender, 378 bool CanStartDragForView(View* sender,
386 const gfx::Point& press_pt, 379 const gfx::Point& press_pt,
387 const gfx::Point& p) override; 380 const gfx::Point& p) override;
388 381
389 // gfx::AnimationDelegate: 382 // gfx::AnimationDelegate:
390 void AnimationProgressed(const gfx::Animation* animation) override; 383 void AnimationProgressed(const gfx::Animation* animation) override;
391 void AnimationEnded(const gfx::Animation* animation) override; 384 void AnimationEnded(const gfx::Animation* animation) override;
392 385
393 // ChromeOmniboxEditController: 386 // ChromeOmniboxEditController:
394 void OnChanged() override; 387 void OnChanged() override;
395 void OnSetFocus() override; 388 void OnSetFocus() override;
396 const ToolbarModel* GetToolbarModel() const override; 389 const ToolbarModel* GetToolbarModel() const override;
397 390
398 // DropdownBarHostDelegate: 391 // DropdownBarHostDelegate:
399 void SetFocusAndSelection(bool select_all) override; 392 void SetFocusAndSelection(bool select_all) override;
400 void SetAnimationOffset(int offset) override; 393 void SetAnimationOffset(int offset) override;
401 394
402 // TemplateURLServiceObserver: 395 // TemplateURLServiceObserver:
403 void OnTemplateURLServiceChanged() override; 396 void OnTemplateURLServiceChanged() override;
404 397
405 // SearchModelObserver:
406 void ModelChanged(const SearchModel::State& old_state,
407 const SearchModel::State& new_state) override;
408
409 // The Browser this LocationBarView is in. Note that at least 398 // The Browser this LocationBarView is in. Note that at least
410 // chromeos::SimpleWebViewDialog uses a LocationBarView outside any browser 399 // chromeos::SimpleWebViewDialog uses a LocationBarView outside any browser
411 // window, so this may be NULL. 400 // window, so this may be NULL.
412 Browser* browser_; 401 Browser* browser_;
413 402
414 OmniboxViewViews* omnibox_view_; 403 OmniboxViewViews* omnibox_view_;
415 404
416 // Our delegate. 405 // Our delegate.
417 Delegate* delegate_; 406 Delegate* delegate_;
418 407
(...skipping 21 matching lines...) Expand all
440 // Shown if the user has selected a keyword. 429 // Shown if the user has selected a keyword.
441 SelectedKeywordView* selected_keyword_view_; 430 SelectedKeywordView* selected_keyword_view_;
442 431
443 // View responsible for showing suggested text. This is NULL when there is no 432 // View responsible for showing suggested text. This is NULL when there is no
444 // suggested text. 433 // suggested text.
445 views::Label* suggested_text_view_; 434 views::Label* suggested_text_view_;
446 435
447 // Shown if the selected url has a corresponding keyword. 436 // Shown if the selected url has a corresponding keyword.
448 KeywordHintView* keyword_hint_view_; 437 KeywordHintView* keyword_hint_view_;
449 438
450 // The voice search icon.
451 views::ImageButton* mic_search_view_;
452
453 // The content setting views. 439 // The content setting views.
454 ContentSettingViews content_setting_views_; 440 ContentSettingViews content_setting_views_;
455 441
456 // The zoom icon. 442 // The zoom icon.
457 ZoomView* zoom_view_; 443 ZoomView* zoom_view_;
458 444
459 // The icon to open a PDF in Reader. 445 // The icon to open a PDF in Reader.
460 OpenPDFInReaderView* open_pdf_in_reader_view_; 446 OpenPDFInReaderView* open_pdf_in_reader_view_;
461 447
462 // The manage passwords icon. 448 // The manage passwords icon.
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
499 int dropdown_animation_offset_; 485 int dropdown_animation_offset_;
500 486
501 // This is a debug state variable that stores if the WebContents was null 487 // This is a debug state variable that stores if the WebContents was null
502 // during the last RefreshPageAction. 488 // during the last RefreshPageAction.
503 bool web_contents_null_at_last_refresh_; 489 bool web_contents_null_at_last_refresh_;
504 490
505 DISALLOW_COPY_AND_ASSIGN(LocationBarView); 491 DISALLOW_COPY_AND_ASSIGN(LocationBarView);
506 }; 492 };
507 493
508 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ 494 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698