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

Side by Side Diff: chrome/browser/cocoa/location_bar/content_setting_decoration.h

Issue 2888014: [Mac] Convert content settings to LocationBarDecoration, cleanup. (Closed) Base URL: git://codf21.jail/chromium.git
Patch Set: noop change aiming for a clean try run. Created 10 years, 5 months 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
(Empty)
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_COCOA_LOCATION_BAR_CONTENT_SETTING_DECORATION_H_
6 #define CHROME_BROWSER_COCOA_LOCATION_BAR_CONTENT_SETTING_DECORATION_H_
7
8 #include "base/scoped_ptr.h"
9 #import "chrome/browser/cocoa/location_bar/image_decoration.h"
10 #include "chrome/common/content_settings_types.h"
11
12 // ContentSettingDecoration is used to display the content settings
13 // images on the current page.
14
15 class ContentSettingImageModel;
16 class LocationBarViewMac;
17 class Profile;
18 class TabContents;
19
20 class ContentSettingDecoration : public ImageDecoration {
21 public:
22 ContentSettingDecoration(ContentSettingsType settings_type,
23 LocationBarViewMac* owner,
24 Profile* profile);
25 virtual ~ContentSettingDecoration();
26
27 // Updates the image and visibility state based on the supplied TabContents.
28 void UpdateFromTabContents(const TabContents* tab_contents);
29
30 // Overridden from |LocationBarDecoration|
31 virtual bool OnMousePressed(NSRect frame);
32 virtual NSString* GetToolTip();
33
34 private:
35 void SetToolTip(NSString* tooltip);
36
37 scoped_ptr<ContentSettingImageModel> content_setting_image_model_;
38
39 LocationBarViewMac* owner_; // weak
40 Profile* profile_; // weak
41
42 scoped_nsobject<NSString> tooltip_;
43
44 DISALLOW_COPY_AND_ASSIGN(ContentSettingDecoration);
45 };
46
47 #endif // CHROME_BROWSER_COCOA_LOCATION_BAR_CONTENT_SETTING_DECORATION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698