| OLD | NEW |
| 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_UI_BROWSER_NAVIGATOR_H_ | 5 #ifndef CHROME_BROWSER_UI_BROWSER_NAVIGATOR_H_ |
| 6 #define CHROME_BROWSER_UI_BROWSER_NAVIGATOR_H_ | 6 #define CHROME_BROWSER_UI_BROWSER_NAVIGATOR_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 | 73 |
| 74 // The disposition requested by the navigation source. Default is | 74 // The disposition requested by the navigation source. Default is |
| 75 // CURRENT_TAB. What follows is a set of coercions that happen to this value | 75 // CURRENT_TAB. What follows is a set of coercions that happen to this value |
| 76 // when other factors are at play: | 76 // when other factors are at play: |
| 77 // | 77 // |
| 78 // [in]: Condition: [out]: | 78 // [in]: Condition: [out]: |
| 79 // NEW_BACKGROUND_TAB target browser tabstrip is empty NEW_FOREGROUND_TAB | 79 // NEW_BACKGROUND_TAB target browser tabstrip is empty NEW_FOREGROUND_TAB |
| 80 // CURRENT_TAB " " " NEW_FOREGROUND_TAB | 80 // CURRENT_TAB " " " NEW_FOREGROUND_TAB |
| 81 // OFF_THE_RECORD target browser profile is incog. NEW_FOREGROUND_TAB | 81 // OFF_THE_RECORD target browser profile is incog. NEW_FOREGROUND_TAB |
| 82 // | 82 // |
| 83 // If disposition is NEW_WINDOW or NEW_POPUP, |show_window| is set to true | |
| 84 // automatically. | |
| 85 // If disposition is NEW_BACKGROUND_TAB, TabStripModel::ADD_SELECTED is | 83 // If disposition is NEW_BACKGROUND_TAB, TabStripModel::ADD_SELECTED is |
| 86 // removed from |tabstrip_add_types| automatically. | 84 // removed from |tabstrip_add_types| automatically. |
| 85 // If disposition is one of NEW_WINDOW, NEW_POPUP, NEW_FOREGROUND_TAB or |
| 86 // SINGLETON_TAB, then TabStripModel::ADD_SELECTED is automatically added to |
| 87 // |tabstrip_add_types|. |
| 87 WindowOpenDisposition disposition; | 88 WindowOpenDisposition disposition; |
| 88 | 89 |
| 89 // The transition type of the navigation. Default is PageTransition::LINK | 90 // The transition type of the navigation. Default is PageTransition::LINK |
| 90 // when target_contents is specified in the constructor. | 91 // when target_contents is specified in the constructor. |
| 91 PageTransition::Type transition; | 92 PageTransition::Type transition; |
| 92 | 93 |
| 93 // The index the caller would like the tab to be positioned at in the | 94 // The index the caller would like the tab to be positioned at in the |
| 94 // TabStrip. The actual index will be determined by the TabHandler in | 95 // TabStrip. The actual index will be determined by the TabHandler in |
| 95 // accordance with |add_types|. Defaults to -1 (allows the TabHandler to | 96 // accordance with |add_types|. Defaults to -1 (allows the TabHandler to |
| 96 // decide). | 97 // decide). |
| (...skipping 10 matching lines...) Expand all Loading... |
| 107 // If non-empty, specifies the desired initial position and size of the | 108 // If non-empty, specifies the desired initial position and size of the |
| 108 // window if |disposition| == NEW_POPUP. | 109 // window if |disposition| == NEW_POPUP. |
| 109 // TODO(beng): Figure out if this can be used to create Browser windows | 110 // TODO(beng): Figure out if this can be used to create Browser windows |
| 110 // for other callsites that use set_override_bounds, or | 111 // for other callsites that use set_override_bounds, or |
| 111 // remove this comment. | 112 // remove this comment. |
| 112 gfx::Rect window_bounds; | 113 gfx::Rect window_bounds; |
| 113 | 114 |
| 114 // True if the target window should be made visible at the end of the call | 115 // True if the target window should be made visible at the end of the call |
| 115 // to Navigate(). This activates the window if it was already visible. | 116 // to Navigate(). This activates the window if it was already visible. |
| 116 // Default is false. | 117 // Default is false. |
| 118 // If disposition is NEW_WINDOW or NEW_POPUP, |show_window| is set to true |
| 119 // automatically. |
| 117 bool show_window; | 120 bool show_window; |
| 118 | 121 |
| 119 // [in] Specifies a Browser object where the navigation could occur or the | 122 // [in] Specifies a Browser object where the navigation could occur or the |
| 120 // tab could be added. Navigate() is not obliged to use this Browser if | 123 // tab could be added. Navigate() is not obliged to use this Browser if |
| 121 // it is not compatible with the operation being performed. If NULL, | 124 // it is not compatible with the operation being performed. If NULL, |
| 122 // |profile| should be specified to find or create a matching Browser. | 125 // |profile| should be specified to find or create a matching Browser. |
| 123 // [out] Specifies the Browser object where the navigation occurred or the | 126 // [out] Specifies the Browser object where the navigation occurred or the |
| 124 // tab was added. Guaranteed non-NULL unless the disposition did not | 127 // tab was added. Guaranteed non-NULL unless the disposition did not |
| 125 // require a navigation, in which case this is set to NULL | 128 // require a navigation, in which case this is set to NULL |
| 126 // (SUPPRESS_OPEN, SAVE_TO_DISK, IGNORE_ACTION). | 129 // (SUPPRESS_OPEN, SAVE_TO_DISK, IGNORE_ACTION). |
| (...skipping 10 matching lines...) Expand all Loading... |
| 137 private: | 140 private: |
| 138 NavigateParams(); | 141 NavigateParams(); |
| 139 }; | 142 }; |
| 140 | 143 |
| 141 // Navigates according to the configuration specified in |params|. | 144 // Navigates according to the configuration specified in |params|. |
| 142 void Navigate(NavigateParams* params); | 145 void Navigate(NavigateParams* params); |
| 143 | 146 |
| 144 } // namespace browser | 147 } // namespace browser |
| 145 | 148 |
| 146 #endif // CHROME_BROWSER_UI_BROWSER_NAVIGATOR_H_ | 149 #endif // CHROME_BROWSER_UI_BROWSER_NAVIGATOR_H_ |
| OLD | NEW |