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

Side by Side Diff: chrome/browser/ui/views/location_bar/location_bar_view.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_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ 6 #define CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "chrome/browser/autocomplete/autocomplete_edit.h" 13 #include "chrome/browser/autocomplete/autocomplete_edit.h"
14 #include "chrome/browser/extensions/extension_context_menu_model.h" 14 #include "chrome/browser/extensions/extension_context_menu_model.h"
15 #include "chrome/browser/first_run/first_run.h"
16 #include "chrome/browser/prefs/pref_member.h" 15 #include "chrome/browser/prefs/pref_member.h"
17 #include "chrome/browser/search_engines/template_url_service_observer.h" 16 #include "chrome/browser/search_engines/template_url_service_observer.h"
18 #include "chrome/browser/ui/omnibox/location_bar.h" 17 #include "chrome/browser/ui/omnibox/location_bar.h"
19 #include "chrome/browser/ui/toolbar/toolbar_model.h" 18 #include "chrome/browser/ui/toolbar/toolbar_model.h"
20 #include "chrome/browser/ui/views/dropdown_bar_host.h" 19 #include "chrome/browser/ui/views/dropdown_bar_host.h"
21 #include "chrome/browser/ui/views/dropdown_bar_host_delegate.h" 20 #include "chrome/browser/ui/views/dropdown_bar_host_delegate.h"
22 #include "chrome/browser/ui/views/extensions/extension_popup.h" 21 #include "chrome/browser/ui/views/extensions/extension_popup.h"
23 #include "ui/gfx/font.h" 22 #include "ui/gfx/font.h"
24 #include "ui/gfx/rect.h" 23 #include "ui/gfx/rect.h"
25 #include "ui/views/controls/native/native_view_host.h" 24 #include "ui/views/controls/native/native_view_host.h"
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 virtual void WriteDragDataForView(View* sender, 233 virtual void WriteDragDataForView(View* sender,
235 const gfx::Point& press_pt, 234 const gfx::Point& press_pt,
236 OSExchangeData* data) OVERRIDE; 235 OSExchangeData* data) OVERRIDE;
237 virtual int GetDragOperationsForView(View* sender, 236 virtual int GetDragOperationsForView(View* sender,
238 const gfx::Point& p) OVERRIDE; 237 const gfx::Point& p) OVERRIDE;
239 virtual bool CanStartDragForView(View* sender, 238 virtual bool CanStartDragForView(View* sender,
240 const gfx::Point& press_pt, 239 const gfx::Point& press_pt,
241 const gfx::Point& p) OVERRIDE; 240 const gfx::Point& p) OVERRIDE;
242 241
243 // Overridden from LocationBar: 242 // Overridden from LocationBar:
244 virtual void ShowFirstRunBubble(FirstRun::BubbleType bubble_type) OVERRIDE; 243 virtual void ShowFirstRunBubble() OVERRIDE;
245 virtual void SetSuggestedText(const string16& text, 244 virtual void SetSuggestedText(const string16& text,
246 InstantCompleteBehavior behavior) OVERRIDE; 245 InstantCompleteBehavior behavior) OVERRIDE;
247 virtual string16 GetInputString() const OVERRIDE; 246 virtual string16 GetInputString() const OVERRIDE;
248 virtual WindowOpenDisposition GetWindowOpenDisposition() const OVERRIDE; 247 virtual WindowOpenDisposition GetWindowOpenDisposition() const OVERRIDE;
249 virtual content::PageTransition GetPageTransition() const OVERRIDE; 248 virtual content::PageTransition GetPageTransition() const OVERRIDE;
250 virtual void AcceptInput() OVERRIDE; 249 virtual void AcceptInput() OVERRIDE;
251 virtual void FocusLocation(bool select_all) OVERRIDE; 250 virtual void FocusLocation(bool select_all) OVERRIDE;
252 virtual void FocusSearch() OVERRIDE; 251 virtual void FocusSearch() OVERRIDE;
253 virtual void UpdateContentSettingsIcons() OVERRIDE; 252 virtual void UpdateContentSettingsIcons() OVERRIDE;
254 virtual void UpdatePageActions() OVERRIDE; 253 virtual void UpdatePageActions() OVERRIDE;
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 bool HasValidSuggestText() const; 336 bool HasValidSuggestText() const;
338 337
339 #if !defined(USE_AURA) 338 #if !defined(USE_AURA)
340 // Returns |location_entry_| cast to OmniboxViewWin, or NULL if 339 // Returns |location_entry_| cast to OmniboxViewWin, or NULL if
341 // |location_entry_| is of a different type. 340 // |location_entry_| is of a different type.
342 OmniboxViewWin* GetOmniboxViewWin(); 341 OmniboxViewWin* GetOmniboxViewWin();
343 #endif 342 #endif
344 #endif 343 #endif
345 344
346 // Helper to show the first run info bubble. 345 // Helper to show the first run info bubble.
347 void ShowFirstRunBubbleInternal(FirstRun::BubbleType bubble_type); 346 void ShowFirstRunBubbleInternal();
348 347
349 // The Autocomplete Edit field. 348 // The Autocomplete Edit field.
350 scoped_ptr<OmniboxView> location_entry_; 349 scoped_ptr<OmniboxView> location_entry_;
351 350
352 // The Browser object that corresponds to this View. 351 // The Browser object that corresponds to this View.
353 Browser* browser_; 352 Browser* browser_;
354 353
355 // The model. 354 // The model.
356 ToolbarModel* model_; 355 ToolbarModel* model_;
357 356
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 // The star. 409 // The star.
411 StarView* star_view_; 410 StarView* star_view_;
412 411
413 // The mode that dictates how the bar shows. 412 // The mode that dictates how the bar shows.
414 Mode mode_; 413 Mode mode_;
415 414
416 // True if we should show a focus rect while the location entry field is 415 // True if we should show a focus rect while the location entry field is
417 // focused. Used when the toolbar is in full keyboard accessibility mode. 416 // focused. Used when the toolbar is in full keyboard accessibility mode.
418 bool show_focus_rect_; 417 bool show_focus_rect_;
419 418
420 // Whether bubble text is short or long.
421 FirstRun::BubbleType bubble_type_;
422
423 // This is in case we're destroyed before the model loads. We need to make 419 // This is in case we're destroyed before the model loads. We need to make
424 // Add/RemoveObserver calls. 420 // Add/RemoveObserver calls.
425 TemplateURLService* template_url_service_; 421 TemplateURLService* template_url_service_;
426 422
427 // Tracks this preference to determine whether bookmark editing is allowed. 423 // Tracks this preference to determine whether bookmark editing is allowed.
428 BooleanPrefMember edit_bookmarks_enabled_; 424 BooleanPrefMember edit_bookmarks_enabled_;
429 425
430 // While animating, the host clips the widget and draws only the bottom 426 // While animating, the host clips the widget and draws only the bottom
431 // part of it. The view needs to know the pixel offset at which we are drawing 427 // part of it. The view needs to know the pixel offset at which we are drawing
432 // the widget so that we can draw the curved edges that attach to the toolbar 428 // the widget so that we can draw the curved edges that attach to the toolbar
433 // in the right location. 429 // in the right location.
434 int animation_offset_; 430 int animation_offset_;
435 431
436 DISALLOW_IMPLICIT_CONSTRUCTORS(LocationBarView); 432 DISALLOW_IMPLICIT_CONSTRUCTORS(LocationBarView);
437 }; 433 };
438 434
439 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ 435 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/first_run_bubble_unittest.cc ('k') | chrome/browser/ui/views/location_bar/location_bar_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698