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

Side by Side Diff: chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h

Issue 9016036: Implement the new first run bubble, clean up old bubbles. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync and merge. Created 8 years, 11 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 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_COCOA_LOCATION_BAR_LOCATION_BAR_VIEW_MAC_H_ 5 #ifndef CHROME_BROWSER_UI_COCOA_LOCATION_BAR_LOCATION_BAR_VIEW_MAC_H_
6 #define CHROME_BROWSER_UI_COCOA_LOCATION_BAR_LOCATION_BAR_VIEW_MAC_H_ 6 #define CHROME_BROWSER_UI_COCOA_LOCATION_BAR_LOCATION_BAR_VIEW_MAC_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
11 #import <Cocoa/Cocoa.h> 11 #import <Cocoa/Cocoa.h>
12 12
13 #include "base/memory/scoped_nsobject.h" 13 #include "base/memory/scoped_nsobject.h"
14 #include "base/memory/scoped_ptr.h" 14 #include "base/memory/scoped_ptr.h"
15 #include "base/memory/scoped_vector.h" 15 #include "base/memory/scoped_vector.h"
16 #include "base/memory/weak_ptr.h" 16 #include "base/memory/weak_ptr.h"
17 #include "chrome/browser/autocomplete/autocomplete_edit.h" 17 #include "chrome/browser/autocomplete/autocomplete_edit.h"
18 #include "chrome/browser/extensions/image_loading_tracker.h" 18 #include "chrome/browser/extensions/image_loading_tracker.h"
19 #include "chrome/browser/first_run/first_run.h"
20 #include "chrome/browser/prefs/pref_member.h" 19 #include "chrome/browser/prefs/pref_member.h"
21 #include "chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.h" 20 #include "chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.h"
22 #include "chrome/browser/ui/omnibox/location_bar.h" 21 #include "chrome/browser/ui/omnibox/location_bar.h"
23 #include "chrome/browser/ui/toolbar/toolbar_model.h" 22 #include "chrome/browser/ui/toolbar/toolbar_model.h"
24 #include "chrome/common/content_settings_types.h" 23 #include "chrome/common/content_settings_types.h"
25 24
26 @class AutocompleteTextField; 25 @class AutocompleteTextField;
27 class CommandUpdater; 26 class CommandUpdater;
28 class ContentSettingDecoration; 27 class ContentSettingDecoration;
29 class EVBubbleDecoration; 28 class EVBubbleDecoration;
(...skipping 16 matching lines...) Expand all
46 public content::NotificationObserver { 45 public content::NotificationObserver {
47 public: 46 public:
48 LocationBarViewMac(AutocompleteTextField* field, 47 LocationBarViewMac(AutocompleteTextField* field,
49 CommandUpdater* command_updater, 48 CommandUpdater* command_updater,
50 ToolbarModel* toolbar_model, 49 ToolbarModel* toolbar_model,
51 Profile* profile, 50 Profile* profile,
52 Browser* browser); 51 Browser* browser);
53 virtual ~LocationBarViewMac(); 52 virtual ~LocationBarViewMac();
54 53
55 // Overridden from LocationBar: 54 // Overridden from LocationBar:
56 virtual void ShowFirstRunBubble(FirstRun::BubbleType bubble_type) OVERRIDE; 55 virtual void ShowFirstRunBubble() OVERRIDE;
57 virtual void SetSuggestedText(const string16& text, 56 virtual void SetSuggestedText(const string16& text,
58 InstantCompleteBehavior behavior) OVERRIDE; 57 InstantCompleteBehavior behavior) OVERRIDE;
59 virtual string16 GetInputString() const OVERRIDE; 58 virtual string16 GetInputString() const OVERRIDE;
60 virtual WindowOpenDisposition GetWindowOpenDisposition() const OVERRIDE; 59 virtual WindowOpenDisposition GetWindowOpenDisposition() const OVERRIDE;
61 virtual content::PageTransition GetPageTransition() const OVERRIDE; 60 virtual content::PageTransition GetPageTransition() const OVERRIDE;
62 virtual void AcceptInput() OVERRIDE; 61 virtual void AcceptInput() OVERRIDE;
63 virtual void FocusLocation(bool select_all) OVERRIDE; 62 virtual void FocusLocation(bool select_all) OVERRIDE;
64 virtual void FocusSearch() OVERRIDE; 63 virtual void FocusSearch() OVERRIDE;
65 virtual void UpdateContentSettingsIcons() OVERRIDE; 64 virtual void UpdateContentSettingsIcons() OVERRIDE;
66 virtual void UpdatePageActions() OVERRIDE; 65 virtual void UpdatePageActions() OVERRIDE;
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 void DeletePageActionDecorations(); 161 void DeletePageActionDecorations();
163 162
164 // Re-generate the page-action decorations from the profile's 163 // Re-generate the page-action decorations from the profile's
165 // extension service. 164 // extension service.
166 void RefreshPageActionDecorations(); 165 void RefreshPageActionDecorations();
167 166
168 // Updates visibility of the content settings icons based on the current 167 // Updates visibility of the content settings icons based on the current
169 // tab contents state. 168 // tab contents state.
170 bool RefreshContentSettingsDecorations(); 169 bool RefreshContentSettingsDecorations();
171 170
172 void ShowFirstRunBubbleInternal(FirstRun::BubbleType bubble_type); 171 void ShowFirstRunBubbleInternal();
173 172
174 // Checks if the bookmark star should be enabled or not. 173 // Checks if the bookmark star should be enabled or not.
175 bool IsStarEnabled(); 174 bool IsStarEnabled();
176 175
177 scoped_ptr<OmniboxViewMac> omnibox_view_; 176 scoped_ptr<OmniboxViewMac> omnibox_view_;
178 177
179 CommandUpdater* command_updater_; // Weak, owned by Browser. 178 CommandUpdater* command_updater_; // Weak, owned by Browser.
180 179
181 AutocompleteTextField* field_; // owned by tab controller 180 AutocompleteTextField* field_; // owned by tab controller
182 181
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 // Used to schedule a task for the first run info bubble. 224 // Used to schedule a task for the first run info bubble.
226 base::WeakPtrFactory<LocationBarViewMac> weak_ptr_factory_; 225 base::WeakPtrFactory<LocationBarViewMac> weak_ptr_factory_;
227 226
228 // Used to change the visibility of the star decoration. 227 // Used to change the visibility of the star decoration.
229 BooleanPrefMember edit_bookmarks_enabled_; 228 BooleanPrefMember edit_bookmarks_enabled_;
230 229
231 DISALLOW_COPY_AND_ASSIGN(LocationBarViewMac); 230 DISALLOW_COPY_AND_ASSIGN(LocationBarViewMac);
232 }; 231 };
233 232
234 #endif // CHROME_BROWSER_UI_COCOA_LOCATION_BAR_LOCATION_BAR_VIEW_MAC_H_ 233 #endif // CHROME_BROWSER_UI_COCOA_LOCATION_BAR_LOCATION_BAR_VIEW_MAC_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/first_run_bubble_controller.mm ('k') | chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698