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.cc

Issue 10560015: Implement base::win::IsMetroProcess. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 8 years, 6 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) 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 #include "chrome/browser/ui/browser.h" 5 #include "chrome/browser/ui/browser.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windows.h> 8 #include <windows.h>
9 #include <shellapi.h> 9 #include <shellapi.h>
10 #endif // OS_WIN 10 #endif // OS_WIN
(...skipping 4171 matching lines...) Expand 10 before | Expand all | Expand 10 after
4182 command_updater_.UpdateCommandEnabled(IDC_SELECT_TAB_0, normal_window); 4182 command_updater_.UpdateCommandEnabled(IDC_SELECT_TAB_0, normal_window);
4183 command_updater_.UpdateCommandEnabled(IDC_SELECT_TAB_1, normal_window); 4183 command_updater_.UpdateCommandEnabled(IDC_SELECT_TAB_1, normal_window);
4184 command_updater_.UpdateCommandEnabled(IDC_SELECT_TAB_2, normal_window); 4184 command_updater_.UpdateCommandEnabled(IDC_SELECT_TAB_2, normal_window);
4185 command_updater_.UpdateCommandEnabled(IDC_SELECT_TAB_3, normal_window); 4185 command_updater_.UpdateCommandEnabled(IDC_SELECT_TAB_3, normal_window);
4186 command_updater_.UpdateCommandEnabled(IDC_SELECT_TAB_4, normal_window); 4186 command_updater_.UpdateCommandEnabled(IDC_SELECT_TAB_4, normal_window);
4187 command_updater_.UpdateCommandEnabled(IDC_SELECT_TAB_5, normal_window); 4187 command_updater_.UpdateCommandEnabled(IDC_SELECT_TAB_5, normal_window);
4188 command_updater_.UpdateCommandEnabled(IDC_SELECT_TAB_6, normal_window); 4188 command_updater_.UpdateCommandEnabled(IDC_SELECT_TAB_6, normal_window);
4189 command_updater_.UpdateCommandEnabled(IDC_SELECT_TAB_7, normal_window); 4189 command_updater_.UpdateCommandEnabled(IDC_SELECT_TAB_7, normal_window);
4190 command_updater_.UpdateCommandEnabled(IDC_SELECT_LAST_TAB, normal_window); 4190 command_updater_.UpdateCommandEnabled(IDC_SELECT_LAST_TAB, normal_window);
4191 #if defined(OS_WIN) 4191 #if defined(OS_WIN)
4192 const bool metro_mode = (base::win::GetMetroModule() != NULL); 4192 const bool metro_mode = base::win::IsMetroProcess();
4193 command_updater_.UpdateCommandEnabled(IDC_METRO_SNAP_ENABLE, metro_mode); 4193 command_updater_.UpdateCommandEnabled(IDC_METRO_SNAP_ENABLE, metro_mode);
4194 command_updater_.UpdateCommandEnabled(IDC_METRO_SNAP_DISABLE, metro_mode); 4194 command_updater_.UpdateCommandEnabled(IDC_METRO_SNAP_DISABLE, metro_mode);
4195 #endif 4195 #endif
4196 #if defined(OS_MACOSX) 4196 #if defined(OS_MACOSX)
4197 command_updater_.UpdateCommandEnabled(IDC_TABPOSE, normal_window); 4197 command_updater_.UpdateCommandEnabled(IDC_TABPOSE, normal_window);
4198 command_updater_.UpdateCommandEnabled(IDC_PRESENTATION_MODE, 4198 command_updater_.UpdateCommandEnabled(IDC_PRESENTATION_MODE,
4199 !(is_type_panel() && is_app())); 4199 !(is_type_panel() && is_app()));
4200 #endif 4200 #endif
4201 4201
4202 // Clipboard commands 4202 // Clipboard commands
(...skipping 1027 matching lines...) Expand 10 before | Expand all | Expand 10 after
5230 if (contents && !allow_js_access) { 5230 if (contents && !allow_js_access) {
5231 contents->web_contents()->GetController().LoadURL( 5231 contents->web_contents()->GetController().LoadURL(
5232 target_url, 5232 target_url,
5233 content::Referrer(), 5233 content::Referrer(),
5234 content::PAGE_TRANSITION_LINK, 5234 content::PAGE_TRANSITION_LINK,
5235 std::string()); // No extra headers. 5235 std::string()); // No extra headers.
5236 } 5236 }
5237 5237
5238 return contents != NULL; 5238 return contents != NULL;
5239 } 5239 }
OLDNEW
« no previous file with comments | « chrome/browser/tab_contents/render_view_context_menu_win.cc ('k') | chrome/browser/ui/browser_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698