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

Side by Side Diff: chrome/browser/bookmarks/bookmark_manager_extension_api.cc

Issue 11411286: Decouple IsMetroProcess() calls, introducing IsSingleWindowMetroMode(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: keep base/win/metro.h in omnibox_view_win.cc for IsTSFAwareRequired() Created 8 years 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
« no previous file with comments | « chrome/browser/DEPS ('k') | chrome/browser/download/download_status_updater_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/bookmarks/bookmark_manager_extension_api.h" 5 #include "chrome/browser/bookmarks/bookmark_manager_extension_api.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/json/json_writer.h" 9 #include "base/json/json_writer.h"
10 #include "base/prefs/public/pref_service_base.h" 10 #include "base/prefs/public/pref_service_base.h"
(...skipping 13 matching lines...) Expand all
24 #include "chrome/browser/ui/webui/chrome_url_data_manager.h" 24 #include "chrome/browser/ui/webui/chrome_url_data_manager.h"
25 #include "chrome/browser/view_type_utils.h" 25 #include "chrome/browser/view_type_utils.h"
26 #include "chrome/common/pref_names.h" 26 #include "chrome/common/pref_names.h"
27 #include "content/public/browser/render_view_host.h" 27 #include "content/public/browser/render_view_host.h"
28 #include "content/public/browser/web_contents.h" 28 #include "content/public/browser/web_contents.h"
29 #include "content/public/browser/web_ui.h" 29 #include "content/public/browser/web_ui.h"
30 #include "grit/generated_resources.h" 30 #include "grit/generated_resources.h"
31 #include "ui/base/l10n/l10n_util.h" 31 #include "ui/base/l10n/l10n_util.h"
32 32
33 #if defined(OS_WIN) 33 #if defined(OS_WIN)
34 #include "base/win/metro.h" 34 #include "win8/util/win8_util.h"
35 #endif // OS_WIN 35 #endif // OS_WIN
36 36
37 namespace keys = bookmark_extension_api_constants; 37 namespace keys = bookmark_extension_api_constants;
38 38
39 using content::WebContents; 39 using content::WebContents;
40 40
41 namespace { 41 namespace {
42 42
43 // Returns a single bookmark node from the argument ID. 43 // Returns a single bookmark node from the argument ID.
44 // This returns NULL in case of failure. 44 // This returns NULL in case of failure.
(...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after
508 508
509 bool RecordLaunchBookmarkFunction::RunImpl() { 509 bool RecordLaunchBookmarkFunction::RunImpl() {
510 bookmark_utils::RecordBookmarkLaunch(bookmark_utils::LAUNCH_MANAGER); 510 bookmark_utils::RecordBookmarkLaunch(bookmark_utils::LAUNCH_MANAGER);
511 return true; 511 return true;
512 } 512 }
513 513
514 bool CanOpenNewWindowsBookmarkFunction::RunImpl() { 514 bool CanOpenNewWindowsBookmarkFunction::RunImpl() {
515 bool can_open_new_windows = true; 515 bool can_open_new_windows = true;
516 516
517 #if defined(OS_WIN) 517 #if defined(OS_WIN)
518 if (base::win::IsMetroProcess()) 518 if (win8::IsSingleWindowMetroMode())
519 can_open_new_windows = false; 519 can_open_new_windows = false;
520 #endif // OS_WIN 520 #endif // OS_WIN
521 521
522 SetResult(new base::FundamentalValue(can_open_new_windows)); 522 SetResult(new base::FundamentalValue(can_open_new_windows));
523 return true; 523 return true;
524 } 524 }
OLDNEW
« no previous file with comments | « chrome/browser/DEPS ('k') | chrome/browser/download/download_status_updater_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698