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

Side by Side Diff: chrome/browser/extensions/extension_devtools_bridge.cc

Issue 10626007: Move ExtensionSystem into extensions namespace (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Master merge; moved class declaration 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/extension_devtools_bridge.h" 5 #include "chrome/browser/extensions/extension_devtools_bridge.h"
6 6
7 #include "base/json/json_writer.h" 7 #include "base/json/json_writer.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "base/stringprintf.h" 10 #include "base/stringprintf.h"
(...skipping 16 matching lines...) Expand all
27 27
28 ExtensionDevToolsBridge::ExtensionDevToolsBridge(int tab_id, 28 ExtensionDevToolsBridge::ExtensionDevToolsBridge(int tab_id,
29 Profile* profile) 29 Profile* profile)
30 : tab_id_(tab_id), 30 : tab_id_(tab_id),
31 profile_(profile), 31 profile_(profile),
32 on_page_event_name_( 32 on_page_event_name_(
33 ExtensionDevToolsEvents::OnPageEventNameForTab(tab_id)), 33 ExtensionDevToolsEvents::OnPageEventNameForTab(tab_id)),
34 on_tab_close_event_name_( 34 on_tab_close_event_name_(
35 ExtensionDevToolsEvents::OnTabCloseEventNameForTab(tab_id)) { 35 ExtensionDevToolsEvents::OnTabCloseEventNameForTab(tab_id)) {
36 extension_devtools_manager_ = 36 extension_devtools_manager_ =
37 ExtensionSystem::Get(profile)->devtools_manager(); 37 extensions::ExtensionSystem::Get(profile)->devtools_manager();
38 DCHECK(extension_devtools_manager_.get()); 38 DCHECK(extension_devtools_manager_.get());
39 } 39 }
40 40
41 ExtensionDevToolsBridge::~ExtensionDevToolsBridge() { 41 ExtensionDevToolsBridge::~ExtensionDevToolsBridge() {
42 } 42 }
43 43
44 static std::string FormatDevToolsMessage(int id, const std::string& method) { 44 static std::string FormatDevToolsMessage(int id, const std::string& method) {
45 DictionaryValue message; 45 DictionaryValue message;
46 message.SetInteger("id", id); 46 message.SetInteger("id", id);
47 message.SetString("method", method); 47 message.SetString("method", method);
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 std::string json = base::StringPrintf("[%s]", data.c_str()); 121 std::string json = base::StringPrintf("[%s]", data.c_str());
122 profile_->GetExtensionEventRouter()->DispatchEventToRenderers( 122 profile_->GetExtensionEventRouter()->DispatchEventToRenderers(
123 on_page_event_name_, json, profile_, GURL(), 123 on_page_event_name_, json, profile_, GURL(),
124 extensions::EventFilteringInfo()); 124 extensions::EventFilteringInfo());
125 } 125 }
126 126
127 void ExtensionDevToolsBridge::ContentsReplaced(WebContents* new_contents) { 127 void ExtensionDevToolsBridge::ContentsReplaced(WebContents* new_contents) {
128 // We don't update the tab id as it needs to remain the same so that we can 128 // We don't update the tab id as it needs to remain the same so that we can
129 // properly unregister. 129 // properly unregister.
130 } 130 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_context_menu_model.cc ('k') | chrome/browser/extensions/extension_event_router.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698