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

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

Issue 11418043: Remove TabContents from OmniboxEditController and friends. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cros Created 8 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 | Annotate | Revision Log
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_CONTENT_SETTING_IMAGE_VIEW_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_CONTENT_SETTING_IMAGE_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_CONTENT_SETTING_IMAGE_VIEW_H_ 6 #define CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_CONTENT_SETTING_IMAGE_VIEW_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "chrome/browser/ui/views/location_bar/location_bar_decoration_view.h" 10 #include "chrome/browser/ui/views/location_bar/location_bar_decoration_view.h"
11 #include "chrome/common/content_settings_types.h" 11 #include "chrome/common/content_settings_types.h"
12 #include "ui/views/widget/widget_observer.h" 12 #include "ui/views/widget/widget_observer.h"
13 13
14 class ContentSettingImageModel; 14 class ContentSettingImageModel;
15 class LocationBarView; 15 class LocationBarView;
16 class TabContents;
17 16
18 // The ContentSettingImageView displays an icon and optional text label for 17 // The ContentSettingImageView displays an icon and optional text label for
19 // various content settings affordances in the location bar (i.e. plugin 18 // various content settings affordances in the location bar (i.e. plugin
20 // blocking, geolocation). 19 // blocking, geolocation).
21 class ContentSettingImageView : public LocationBarDecorationView, 20 class ContentSettingImageView : public LocationBarDecorationView,
22 public views::WidgetObserver { 21 public views::WidgetObserver {
23 public: 22 public:
24 ContentSettingImageView(ContentSettingsType content_type, 23 ContentSettingImageView(ContentSettingsType content_type,
25 const int background_images[], 24 const int background_images[],
26 LocationBarView* parent, 25 LocationBarView* parent,
27 const gfx::Font& font, 26 const gfx::Font& font,
28 SkColor font_color); 27 SkColor font_color);
29 virtual ~ContentSettingImageView(); 28 virtual ~ContentSettingImageView();
30 29
31 virtual void Update(TabContents* tab_contents) OVERRIDE; 30 virtual void Update(content::WebContents* web_contents) OVERRIDE;
32 31
33 32
34 // views::WidgetObserver override: 33 // views::WidgetObserver override:
35 virtual void OnWidgetClosing(views::Widget* widget) OVERRIDE; 34 virtual void OnWidgetClosing(views::Widget* widget) OVERRIDE;
36 35
37 protected: 36 protected:
38 // Invoked when the user clicks on the control. 37 // Invoked when the user clicks on the control.
39 virtual void OnClick(LocationBarView* parent) OVERRIDE; 38 virtual void OnClick(LocationBarView* parent) OVERRIDE;
40 virtual int GetTextAnimationSize(double state, int text_size) OVERRIDE; 39 virtual int GetTextAnimationSize(double state, int text_size) OVERRIDE;
41 40
42 private: 41 private:
43 scoped_ptr<ContentSettingImageModel> content_setting_image_model_; 42 scoped_ptr<ContentSettingImageModel> content_setting_image_model_;
44 43
45 views::Widget* bubble_widget_; 44 views::Widget* bubble_widget_;
46 45
47 DISALLOW_IMPLICIT_CONSTRUCTORS(ContentSettingImageView); 46 DISALLOW_IMPLICIT_CONSTRUCTORS(ContentSettingImageView);
48 }; 47 };
49 48
50 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_CONTENT_SETTING_IMAGE_VIEW_H_ 49 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_CONTENT_SETTING_IMAGE_VIEW_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/tab_contents/tab_contents.h ('k') | chrome/browser/ui/views/location_bar/content_setting_image_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698