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

Side by Side Diff: chrome/browser/gtk/location_bar_view_gtk.h

Issue 1578021: Shift omnibox dropdown in and up on Windows, and square off the top, so it co... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 8 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) 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_GTK_LOCATION_BAR_VIEW_GTK_H_ 5 #ifndef CHROME_BROWSER_GTK_LOCATION_BAR_VIEW_GTK_H_
6 #define CHROME_BROWSER_GTK_LOCATION_BAR_VIEW_GTK_H_ 6 #define CHROME_BROWSER_GTK_LOCATION_BAR_VIEW_GTK_H_
7 7
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 12 matching lines...) Expand all
23 #include "chrome/browser/location_bar.h" 23 #include "chrome/browser/location_bar.h"
24 #include "chrome/common/content_settings_types.h" 24 #include "chrome/common/content_settings_types.h"
25 #include "chrome/common/notification_observer.h" 25 #include "chrome/common/notification_observer.h"
26 #include "chrome/common/notification_registrar.h" 26 #include "chrome/common/notification_registrar.h"
27 #include "chrome/common/owned_widget_gtk.h" 27 #include "chrome/common/owned_widget_gtk.h"
28 #include "chrome/common/page_transition_types.h" 28 #include "chrome/common/page_transition_types.h"
29 #include "third_party/skia/include/core/SkBitmap.h" 29 #include "third_party/skia/include/core/SkBitmap.h"
30 #include "webkit/glue/window_open_disposition.h" 30 #include "webkit/glue/window_open_disposition.h"
31 31
32 class AutocompleteEditViewGtk; 32 class AutocompleteEditViewGtk;
33 class BubblePositioner;
34 class Browser; 33 class Browser;
35 class CommandUpdater; 34 class CommandUpdater;
36 class ContentSettingImageModel; 35 class ContentSettingImageModel;
37 class ContentSettingBubbleGtk; 36 class ContentSettingBubbleGtk;
38 class ExtensionAction; 37 class ExtensionAction;
39 class GtkThemeProvider; 38 class GtkThemeProvider;
40 class Profile; 39 class Profile;
41 class SkBitmap; 40 class SkBitmap;
42 class TabContents; 41 class TabContents;
43 class ToolbarModel; 42 class ToolbarModel;
44 43
45 class LocationBarViewGtk : public AutocompleteEditController, 44 class LocationBarViewGtk : public AutocompleteEditController,
46 public LocationBar, 45 public LocationBar,
47 public LocationBarTesting, 46 public LocationBarTesting,
48 public NotificationObserver { 47 public NotificationObserver {
49 public: 48 public:
50 LocationBarViewGtk(const BubblePositioner* bubble_positioner, 49 explicit LocationBarViewGtk(Browser* browser_);
51 Browser* browser_);
52 virtual ~LocationBarViewGtk(); 50 virtual ~LocationBarViewGtk();
53 51
54 void Init(bool popup_window_mode); 52 void Init(bool popup_window_mode);
55 53
56 void SetProfile(Profile* profile); 54 void SetProfile(Profile* profile);
57 55
58 // Returns the widget the caller should host. You must call Init() first. 56 // Returns the widget the caller should host. You must call Init() first.
59 GtkWidget* widget() { return hbox_.get(); } 57 GtkWidget* widget() { return hbox_.get(); }
60 58
61 // Returns the current TabContents. 59 // Returns the current TabContents.
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 // Hint to user that the inputted text is not a keyword or url. 343 // Hint to user that the inputted text is not a keyword or url.
346 GtkWidget* type_to_search_hint_; 344 GtkWidget* type_to_search_hint_;
347 345
348 scoped_ptr<AutocompleteEditViewGtk> location_entry_; 346 scoped_ptr<AutocompleteEditViewGtk> location_entry_;
349 347
350 Profile* profile_; 348 Profile* profile_;
351 CommandUpdater* command_updater_; 349 CommandUpdater* command_updater_;
352 ToolbarModel* toolbar_model_; 350 ToolbarModel* toolbar_model_;
353 Browser* browser_; 351 Browser* browser_;
354 352
355 // We need to hold on to this just to it pass to the edit.
356 const BubblePositioner* bubble_positioner_;
357
358 // When we get an OnAutocompleteAccept notification from the autocomplete 353 // When we get an OnAutocompleteAccept notification from the autocomplete
359 // edit, we save the input string so we can give it back to the browser on 354 // edit, we save the input string so we can give it back to the browser on
360 // the LocationBar interface via GetInputString(). 355 // the LocationBar interface via GetInputString().
361 std::wstring location_input_; 356 std::wstring location_input_;
362 357
363 // The user's desired disposition for how their input should be opened. 358 // The user's desired disposition for how their input should be opened.
364 WindowOpenDisposition disposition_; 359 WindowOpenDisposition disposition_;
365 360
366 // The transition type to use for the navigation. 361 // The transition type to use for the navigation.
367 PageTransition::Type transition_; 362 PageTransition::Type transition_;
(...skipping 20 matching lines...) Expand all
388 // Indicate if |tab_to_search_hint_| should be shown. 383 // Indicate if |tab_to_search_hint_| should be shown.
389 bool show_keyword_hint_; 384 bool show_keyword_hint_;
390 385
391 // Indicate if |type_to_search_hint_| should be shown. 386 // Indicate if |type_to_search_hint_| should be shown.
392 bool show_search_hint_; 387 bool show_search_hint_;
393 388
394 DISALLOW_COPY_AND_ASSIGN(LocationBarViewGtk); 389 DISALLOW_COPY_AND_ASSIGN(LocationBarViewGtk);
395 }; 390 };
396 391
397 #endif // CHROME_BROWSER_GTK_LOCATION_BAR_VIEW_GTK_H_ 392 #endif // CHROME_BROWSER_GTK_LOCATION_BAR_VIEW_GTK_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698