OLD | NEW |
---|---|
1 // Copyright (c) 2012 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_ANDROID_TAB_MODEL_TAB_MODEL_H_ | 5 #ifndef CHROME_BROWSER_UI_ANDROID_TAB_MODEL_TAB_MODEL_H_ |
6 #define CHROME_BROWSER_UI_ANDROID_TAB_MODEL_TAB_MODEL_H_ | 6 #define CHROME_BROWSER_UI_ANDROID_TAB_MODEL_TAB_MODEL_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "chrome/browser/sessions/session_id.h" | 9 #include "chrome/browser/sessions/session_id.h" |
10 #include "chrome/browser/ui/toolbar/toolbar_model.h" | 10 #include "chrome/browser/ui/toolbar/toolbar_model.h" |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
51 // Used for restoring tabs from synced foreign sessions. | 51 // Used for restoring tabs from synced foreign sessions. |
52 virtual void CreateTab(content::WebContents* web_contents) = 0; | 52 virtual void CreateTab(content::WebContents* web_contents) = 0; |
53 | 53 |
54 // Return true if we are currently restoring sessions asynchronously. | 54 // Return true if we are currently restoring sessions asynchronously. |
55 virtual bool IsSessionRestoreInProgress() const = 0; | 55 virtual bool IsSessionRestoreInProgress() const = 0; |
56 | 56 |
57 virtual void OpenClearBrowsingData() const = 0; | 57 virtual void OpenClearBrowsingData() const = 0; |
58 | 58 |
59 ToolbarModel::SecurityLevel GetSecurityLevelForCurrentTab(); | 59 ToolbarModel::SecurityLevel GetSecurityLevelForCurrentTab(); |
60 | 60 |
61 // Returns search terms extracted from the current url if possible. | |
62 string16 GetSearchTermsForCurrentUrl(); | |
Ted C
2013/03/01 02:50:21
Hmm...I would still probably say CurrentTab instea
Yusuf
2013/03/01 18:58:20
Done.
| |
63 | |
64 // Returns the parameter that is used to trigger query extraction. | |
65 std::string GetQueryExtractionParam(); | |
66 | |
61 protected: | 67 protected: |
62 // Instructs the TabModel to broadcast a notification that all tabs are now | 68 // Instructs the TabModel to broadcast a notification that all tabs are now |
63 // loaded from storage. | 69 // loaded from storage. |
64 void BroadcastSessionRestoreComplete(); | 70 void BroadcastSessionRestoreComplete(); |
65 | 71 |
66 ToolbarModel* GetToolbarModel(); | 72 ToolbarModel* GetToolbarModel(); |
67 | 73 |
68 private: | 74 private: |
69 // Determines how TabModel will interact with the profile. | 75 // Determines how TabModel will interact with the profile. |
70 virtual void Observe(int type, | 76 virtual void Observe(int type, |
(...skipping 16 matching lines...) Expand all Loading... | |
87 // across sessions. | 93 // across sessions. |
88 SessionID session_id_; | 94 SessionID session_id_; |
89 | 95 |
90 // The Registrar used to register TabModel for notifications. | 96 // The Registrar used to register TabModel for notifications. |
91 content::NotificationRegistrar registrar_; | 97 content::NotificationRegistrar registrar_; |
92 | 98 |
93 DISALLOW_COPY_AND_ASSIGN(TabModel); | 99 DISALLOW_COPY_AND_ASSIGN(TabModel); |
94 }; | 100 }; |
95 | 101 |
96 #endif // CHROME_BROWSER_UI_ANDROID_TAB_MODEL_TAB_MODEL_H_ | 102 #endif // CHROME_BROWSER_UI_ANDROID_TAB_MODEL_TAB_MODEL_H_ |
OLD | NEW |