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

Side by Side Diff: chrome/browser/ui/browser_instant_controller.h

Issue 17114002: Field trial removing tiles from NTP if URL is already open - for 1993 clients (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed asvitkines comments Created 7 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
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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_BROWSER_INSTANT_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_UI_BROWSER_INSTANT_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_BROWSER_INSTANT_CONTROLLER_H_ 6 #define CHROME_BROWSER_UI_BROWSER_INSTANT_CONTROLLER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "base/prefs/pref_change_registrar.h" 12 #include "base/prefs/pref_change_registrar.h"
13 #include "chrome/browser/ui/search/instant_controller.h" 13 #include "chrome/browser/ui/search/instant_controller.h"
14 #include "chrome/browser/ui/search/instant_unload_handler.h" 14 #include "chrome/browser/ui/search/instant_unload_handler.h"
15 #include "chrome/browser/ui/search/search_model_observer.h" 15 #include "chrome/browser/ui/search/search_model_observer.h"
16 #include "chrome/browser/ui/tabs/tab_strip_model.h"
16 #include "net/base/network_change_notifier.h" 17 #include "net/base/network_change_notifier.h"
17 #include "ui/base/window_open_disposition.h" 18 #include "ui/base/window_open_disposition.h"
18 19
19 class Browser; 20 class Browser;
20 struct InstantSuggestion; 21 struct InstantSuggestion;
21 class Profile; 22 class Profile;
22 23
23 namespace content { 24 namespace content {
24 class WebContents; 25 class WebContents;
25 } 26 }
(...skipping 21 matching lines...) Expand all
47 content::WebContents* source_contents, 48 content::WebContents* source_contents,
48 content::WebContents** target_contents); 49 content::WebContents** target_contents);
49 50
50 // Commits the current Instant, returning true on success. This is intended 51 // Commits the current Instant, returning true on success. This is intended
51 // for use from OpenCurrentURL. 52 // for use from OpenCurrentURL.
52 bool OpenInstant(WindowOpenDisposition disposition, const GURL& url); 53 bool OpenInstant(WindowOpenDisposition disposition, const GURL& url);
53 54
54 // Returns the Profile associated with the Browser that owns this object. 55 // Returns the Profile associated with the Browser that owns this object.
55 Profile* profile() const; 56 Profile* profile() const;
56 57
58 // Returns the TabStripModel associated with the Browser owning this object.
59 const TabStripModel* tab_strip_model() const;
60
57 // Returns the InstantController or NULL if there is no InstantController for 61 // Returns the InstantController or NULL if there is no InstantController for
58 // this BrowserInstantController. 62 // this BrowserInstantController.
59 InstantController* instant() { return &instant_; } 63 InstantController* instant() { return &instant_; }
60 64
61 // Invoked by |instant_| to give the omnibox focus, with the option of making 65 // Invoked by |instant_| to give the omnibox focus, with the option of making
62 // the caret invisible. 66 // the caret invisible.
63 void FocusOmnibox(bool caret_visibility); 67 void FocusOmnibox(bool caret_visibility);
64 68
65 // Invoked by |instant_| to get the currently active tab. 69 // Invoked by |instant_| to get the currently active tab.
66 content::WebContents* GetActiveWebContents() const; 70 content::WebContents* GetActiveWebContents() const;
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 114
111 InstantController instant_; 115 InstantController instant_;
112 InstantUnloadHandler instant_unload_handler_; 116 InstantUnloadHandler instant_unload_handler_;
113 117
114 PrefChangeRegistrar profile_pref_registrar_; 118 PrefChangeRegistrar profile_pref_registrar_;
115 119
116 DISALLOW_COPY_AND_ASSIGN(BrowserInstantController); 120 DISALLOW_COPY_AND_ASSIGN(BrowserInstantController);
117 }; 121 };
118 122
119 #endif // CHROME_BROWSER_UI_BROWSER_INSTANT_CONTROLLER_H_ 123 #endif // CHROME_BROWSER_UI_BROWSER_INSTANT_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698