Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_DEFAULT_SEARCH_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_DEFAULT_SEARCH_VIEW_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_DEFAULT_SEARCH_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_DEFAULT_SEARCH_VIEW_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 42 // Takes ownership of |proposed_default_turl|. | 42 // Takes ownership of |proposed_default_turl|. |
| 43 static void Show(TabContents* tab_contents, | 43 static void Show(TabContents* tab_contents, |
| 44 TemplateURL* , | 44 TemplateURL* , |
| 45 TemplateURLService* template_url_service); | 45 TemplateURLService* template_url_service); |
| 46 | 46 |
| 47 virtual ~DefaultSearchView(); | 47 virtual ~DefaultSearchView(); |
| 48 | 48 |
| 49 protected: | 49 protected: |
| 50 // Overridden from views::View: | 50 // Overridden from views::View: |
| 51 // Draws the gray background at the top of the dialog. | 51 // Draws the gray background at the top of the dialog. |
| 52 virtual void OnPaint(gfx::Canvas* canvas); | 52 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; |
| 53 | 53 |
| 54 // Overridden from views::ButtonListener: | 54 // Overridden from views::ButtonListener: |
| 55 virtual void ButtonPressed(views::Button* sender, const views::Event& event); | 55 virtual void ButtonPressed(views::Button* sender, |
| 56 const views::Event& event) OVERRIDE; | |
| 56 | 57 |
| 57 // ConstrainedDialogDelegate: | 58 // ConstrainedDialogDelegate: |
| 58 virtual std::wstring GetWindowTitle() const; | 59 virtual std::wstring GetWindowTitle() const OVERRIDE; |
| 59 virtual views::View* GetInitiallyFocusedView(); | 60 virtual views::View* GetInitiallyFocusedView() OVERRIDE; |
| 60 virtual views::View* GetContentsView(); | 61 virtual views::View* GetContentsView() OVERRIDE; |
| 61 virtual int GetDialogButtons() const; | 62 virtual int GetDialogButtons() const OVERRIDE; |
| 62 virtual bool Accept(); | 63 virtual bool Accept() OVERRIDE; |
| 64 virtual views::Widget* GetWidget() OVERRIDE; | |
| 65 virtual const views::Widget* GetWidget() const OVERRIDE; | |
|
Nico
2011/06/17 03:48:15
Hi Ben,
you added a "TODO: Find out why clang doe
| |
| 63 | 66 |
| 64 private: | 67 private: |
| 65 // Takes ownership of |proposed_default_turl|. | 68 // Takes ownership of |proposed_default_turl|. |
| 66 DefaultSearchView(TabContents* tab_contents, | 69 DefaultSearchView(TabContents* tab_contents, |
| 67 TemplateURL* proposed_default_turl, | 70 TemplateURL* proposed_default_turl, |
| 68 TemplateURLService* template_url_service); | 71 TemplateURLService* template_url_service); |
| 69 | 72 |
| 70 // Initializes the labels and controls in the view. | 73 // Initializes the labels and controls in the view. |
| 71 void SetupControls(PrefService* prefs); | 74 void SetupControls(PrefService* prefs); |
| 72 | 75 |
| 73 // Image of browser search box with grey background and bubble arrow. | 76 // Image of browser search box with grey background and bubble arrow. |
| 74 views::ImageView* background_image_; | 77 views::ImageView* background_image_; |
| 75 | 78 |
| 76 // Button for the current default search engine. | 79 // Button for the current default search engine. |
| 77 views::View* default_provider_button_; | 80 views::View* default_provider_button_; |
| 78 | 81 |
| 79 // Button for the newly proposed search engine. | 82 // Button for the newly proposed search engine. |
| 80 views::View* proposed_provider_button_; | 83 views::View* proposed_provider_button_; |
| 81 | 84 |
| 82 // The proposed new default search engine. | 85 // The proposed new default search engine. |
| 83 scoped_ptr<TemplateURL> proposed_turl_; | 86 scoped_ptr<TemplateURL> proposed_turl_; |
| 84 | 87 |
| 85 TemplateURLService* template_url_service_; | 88 TemplateURLService* template_url_service_; |
| 86 | 89 |
| 87 DISALLOW_COPY_AND_ASSIGN(DefaultSearchView); | 90 DISALLOW_COPY_AND_ASSIGN(DefaultSearchView); |
| 88 }; | 91 }; |
| 89 | 92 |
| 90 #endif // CHROME_BROWSER_UI_VIEWS_DEFAULT_SEARCH_VIEW_H_ | 93 #endif // CHROME_BROWSER_UI_VIEWS_DEFAULT_SEARCH_VIEW_H_ |
| OLD | NEW |