OLD | NEW |
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 #include "chrome/browser/ui/browser_commands.h" | 5 #include "chrome/browser/ui/browser_commands.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram.h" |
9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
10 #include "chrome/browser/bookmarks/bookmark_model.h" | 10 #include "chrome/browser/bookmarks/bookmark_model.h" |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 } | 196 } |
197 | 197 |
198 bool IsNTPModeForInstantExtendedAPI(const Browser* browser) { | 198 bool IsNTPModeForInstantExtendedAPI(const Browser* browser) { |
199 return browser->search_model() && | 199 return browser->search_model() && |
200 search::IsInstantExtendedAPIEnabled(browser->profile()) && | 200 search::IsInstantExtendedAPIEnabled(browser->profile()) && |
201 browser->search_model()->mode().is_ntp(); | 201 browser->search_model()->mode().is_ntp(); |
202 } | 202 } |
203 | 203 |
204 } // namespace | 204 } // namespace |
205 | 205 |
| 206 #include "chrome/app/chrome_command_ids.h" |
206 bool IsCommandEnabled(Browser* browser, int command) { | 207 bool IsCommandEnabled(Browser* browser, int command) { |
207 return browser->command_controller()->command_updater()->IsCommandEnabled( | 208 return browser->command_controller()->command_updater()->IsCommandEnabled( |
208 command); | 209 command); |
209 } | 210 } |
210 | 211 |
211 bool SupportsCommand(Browser* browser, int command) { | 212 bool SupportsCommand(Browser* browser, int command) { |
212 return browser->command_controller()->command_updater()->SupportsCommand( | 213 return browser->command_controller()->command_updater()->SupportsCommand( |
213 command); | 214 command); |
214 } | 215 } |
215 | 216 |
(...skipping 878 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1094 Browser::CreateParams::CreateForApp( | 1095 Browser::CreateParams::CreateForApp( |
1095 Browser::TYPE_POPUP, app_name, gfx::Rect(), browser->profile())); | 1096 Browser::TYPE_POPUP, app_name, gfx::Rect(), browser->profile())); |
1096 app_browser->tab_strip_model()->AppendWebContents(contents, true); | 1097 app_browser->tab_strip_model()->AppendWebContents(contents, true); |
1097 | 1098 |
1098 contents->GetMutableRendererPrefs()->can_accept_load_drops = false; | 1099 contents->GetMutableRendererPrefs()->can_accept_load_drops = false; |
1099 contents->GetRenderViewHost()->SyncRendererPrefs(); | 1100 contents->GetRenderViewHost()->SyncRendererPrefs(); |
1100 app_browser->window()->Show(); | 1101 app_browser->window()->Show(); |
1101 } | 1102 } |
1102 | 1103 |
1103 } // namespace chrome | 1104 } // namespace chrome |
OLD | NEW |