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

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

Issue 3054040: [Mac] Adjust browser-action and content-setting popup points (Closed) Base URL: git://codf21.jail/chromium.git
Patch Set: Merge to LKGR. Created 10 years, 4 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
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 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 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_COCOA_LOCATION_BAR_CONTENT_SETTING_DECORATION_H_ 5 #ifndef CHROME_BROWSER_COCOA_LOCATION_BAR_CONTENT_SETTING_DECORATION_H_
6 #define CHROME_BROWSER_COCOA_LOCATION_BAR_CONTENT_SETTING_DECORATION_H_ 6 #define CHROME_BROWSER_COCOA_LOCATION_BAR_CONTENT_SETTING_DECORATION_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/scoped_ptr.h" 9 #include "base/scoped_ptr.h"
10 #import "chrome/browser/cocoa/location_bar/image_decoration.h" 10 #import "chrome/browser/cocoa/location_bar/image_decoration.h"
(...skipping 16 matching lines...) Expand all
27 27
28 // Updates the image and visibility state based on the supplied TabContents. 28 // Updates the image and visibility state based on the supplied TabContents.
29 void UpdateFromTabContents(const TabContents* tab_contents); 29 void UpdateFromTabContents(const TabContents* tab_contents);
30 30
31 // Overridden from |LocationBarDecoration| 31 // Overridden from |LocationBarDecoration|
32 virtual bool AcceptsMousePress() { return true; } 32 virtual bool AcceptsMousePress() { return true; }
33 virtual bool OnMousePressed(NSRect frame); 33 virtual bool OnMousePressed(NSRect frame);
34 virtual NSString* GetToolTip(); 34 virtual NSString* GetToolTip();
35 35
36 private: 36 private:
37 // Helper to get where the bubble point should land. Similar to
38 // |PageActionDecoration| or |StarDecoration| (|LocationBarViewMac|
39 // calls those).
40 NSPoint GetBubblePointInFrame(NSRect frame);
41
37 void SetToolTip(NSString* tooltip); 42 void SetToolTip(NSString* tooltip);
38 43
39 scoped_ptr<ContentSettingImageModel> content_setting_image_model_; 44 scoped_ptr<ContentSettingImageModel> content_setting_image_model_;
40 45
41 LocationBarViewMac* owner_; // weak 46 LocationBarViewMac* owner_; // weak
42 Profile* profile_; // weak 47 Profile* profile_; // weak
43 48
44 scoped_nsobject<NSString> tooltip_; 49 scoped_nsobject<NSString> tooltip_;
45 50
46 DISALLOW_COPY_AND_ASSIGN(ContentSettingDecoration); 51 DISALLOW_COPY_AND_ASSIGN(ContentSettingDecoration);
47 }; 52 };
48 53
49 #endif // CHROME_BROWSER_COCOA_LOCATION_BAR_CONTENT_SETTING_DECORATION_H_ 54 #endif // CHROME_BROWSER_COCOA_LOCATION_BAR_CONTENT_SETTING_DECORATION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698