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

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

Issue 10696208: Move ExtensionEventRouter and related into extensions namespace (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fixed bug + latest master Created 8 years, 5 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" 19 #include "chrome/browser/extensions/api/tabs/tabs.h"
20 #include "chrome/browser/extensions/api/tabs/tabs_constants.h" 20 #include "chrome/browser/extensions/api/tabs/tabs_constants.h"
21 #include "chrome/browser/extensions/extension_event_names.h" 21 #include "chrome/browser/extensions/event_names.h"
22 #include "chrome/browser/extensions/extension_event_router.h" 22 #include "chrome/browser/extensions/event_router.h"
23 #include "chrome/browser/extensions/extension_function_dispatcher.h" 23 #include "chrome/browser/extensions/extension_function_dispatcher.h"
24 #include "chrome/browser/extensions/extension_service.h" 24 #include "chrome/browser/extensions/extension_service.h"
25 #include "chrome/browser/extensions/extension_tab_util.h" 25 #include "chrome/browser/extensions/extension_tab_util.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.h" 29 #include "chrome/browser/ui/tab_contents/tab_contents.h"
30 #include "chrome/browser/ui/window_sizer/window_sizer.h" 30 #include "chrome/browser/ui/window_sizer/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"
(...skipping 10 matching lines...) Expand all
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 = extensions::tabs_constants; 52 namespace tabs_keys = extensions::tabs_constants;
53 namespace events = extension_event_names; 53 namespace events = extensions::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();
63 virtual ~OffscreenTab(); 63 virtual ~OffscreenTab();
(...skipping 768 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
« no previous file with comments | « chrome/browser/extensions/api/managed_mode/managed_mode_api.cc ('k') | chrome/browser/extensions/api/omnibox/omnibox_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698