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

Side by Side Diff: chrome/browser/extensions/api/offscreen_tabs/offscreen_tabs_api.cc

Issue 10544023: Moving the tabs_module API into a separate directory in api/ (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Correcting the order of includes. 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
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/extensions/api/offscreen_tabs/offscreen_tabs_api.h" 5 #include "chrome/browser/extensions/api/offscreen_tabs/offscreen_tabs_api.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/hash_tables.h" 10 #include "base/hash_tables.h"
11 #include "base/json/json_writer.h" 11 #include "base/json/json_writer.h"
12 #include "base/memory/linked_ptr.h" 12 #include "base/memory/linked_ptr.h"
13 #include "base/memory/scoped_vector.h" 13 #include "base/memory/scoped_vector.h"
14 #include "base/lazy_instance.h" 14 #include "base/lazy_instance.h"
15 #include "base/string_number_conversions.h" 15 #include "base/string_number_conversions.h"
16 #include "base/string_util.h" 16 #include "base/string_util.h"
17 #include "base/values.h" 17 #include "base/values.h"
18 #include "chrome/browser/extensions/api/offscreen_tabs/offscreen_tabs_constants. h" 18 #include "chrome/browser/extensions/api/offscreen_tabs/offscreen_tabs_constants. h"
19 #include "chrome/browser/extensions/api/tabs/tabs.h"
20 #include "chrome/browser/extensions/api/tabs/tabs_constants.h"
19 #include "chrome/browser/extensions/extension_event_names.h" 21 #include "chrome/browser/extensions/extension_event_names.h"
20 #include "chrome/browser/extensions/extension_event_router.h" 22 #include "chrome/browser/extensions/extension_event_router.h"
21 #include "chrome/browser/extensions/extension_function_dispatcher.h" 23 #include "chrome/browser/extensions/extension_function_dispatcher.h"
22 #include "chrome/browser/extensions/extension_service.h" 24 #include "chrome/browser/extensions/extension_service.h"
23 #include "chrome/browser/extensions/extension_tab_util.h" 25 #include "chrome/browser/extensions/extension_tab_util.h"
24 #include "chrome/browser/extensions/extension_tabs_module.h"
25 #include "chrome/browser/extensions/extension_tabs_module_constants.h"
26 #include "chrome/browser/profiles/profile.h" 26 #include "chrome/browser/profiles/profile.h"
27 #include "chrome/browser/ui/browser.h" 27 #include "chrome/browser/ui/browser.h"
28 #include "chrome/browser/ui/browser_window.h" 28 #include "chrome/browser/ui/browser_window.h"
29 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" 29 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
30 #include "chrome/browser/ui/window_sizer.h" 30 #include "chrome/browser/ui/window_sizer.h"
31 #include "chrome/common/chrome_notification_types.h" 31 #include "chrome/common/chrome_notification_types.h"
32 #include "chrome/common/extensions/extension.h" 32 #include "chrome/common/extensions/extension.h"
33 #include "chrome/common/extensions/extension_error_utils.h" 33 #include "chrome/common/extensions/extension_error_utils.h"
34 #include "chrome/common/extensions/extension_messages.h" 34 #include "chrome/common/extensions/extension_messages.h"
35 #include "chrome/common/pref_names.h" 35 #include "chrome/common/pref_names.h"
36 #include "chrome/common/url_constants.h" 36 #include "chrome/common/url_constants.h"
37 #include "content/public/browser/navigation_controller.h" 37 #include "content/public/browser/navigation_controller.h"
38 #include "content/public/browser/notification_details.h" 38 #include "content/public/browser/notification_details.h"
39 #include "content/public/browser/notification_source.h" 39 #include "content/public/browser/notification_source.h"
40 #include "content/public/browser/render_view_host.h" 40 #include "content/public/browser/render_view_host.h"
41 #include "content/public/browser/web_contents.h" 41 #include "content/public/browser/web_contents.h"
42 #include "content/public/browser/web_contents_view.h" 42 #include "content/public/browser/web_contents_view.h"
43 43
44 using content::NativeWebKeyboardEvent; 44 using content::NativeWebKeyboardEvent;
45 using content::NavigationController; 45 using content::NavigationController;
46 using content::NotificationDetails; 46 using content::NotificationDetails;
47 using content::NotificationSource; 47 using content::NotificationSource;
48 using content::WebContents; 48 using content::WebContents;
49 using WebKit::WebInputEvent; 49 using WebKit::WebInputEvent;
50 50
51 namespace keys = extensions::offscreen_tabs_constants; 51 namespace keys = extensions::offscreen_tabs_constants;
52 namespace tabs_keys = extension_tabs_module_constants; 52 namespace tabs_keys = extensions::tabs_constants;
53 namespace events = extension_event_names; 53 namespace events = extension_event_names;
54 54
55 namespace { 55 namespace {
56 56
57 class ParentTab; 57 class ParentTab;
58 58
59 // This class is responsible for the life cycle of an offscreen tab. 59 // This class is responsible for the life cycle of an offscreen tab.
60 class OffscreenTab : public content::NotificationObserver { 60 class OffscreenTab : public content::NotificationObserver {
61 public: 61 public:
62 OffscreenTab(); 62 OffscreenTab();
(...skipping 769 matching lines...) Expand 10 before | Expand all | Expand 10 after
832 // async case (when a "javascript": URL is sent to a tab). 832 // async case (when a "javascript": URL is sent to a tab).
833 if (!is_async) 833 if (!is_async)
834 SendResponse(true); 834 SendResponse(true);
835 835
836 return true; 836 return true;
837 } 837 }
838 838
839 void UpdateOffscreenTabFunction::PopulateResult() { 839 void UpdateOffscreenTabFunction::PopulateResult() {
840 // There's no result associated with this callback. 840 // There's no result associated with this callback.
841 } 841 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698