| 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 #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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |