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/extensions/tab_helper.h" | 5 #include "chrome/browser/extensions/tab_helper.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
9 #include "chrome/browser/chrome_notification_types.h" | 9 #include "chrome/browser/chrome_notification_types.h" |
10 #include "chrome/browser/extensions/activity_log/activity_log.h" | 10 #include "chrome/browser/extensions/activity_log/activity_log.h" |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 #include "extensions/common/extension_urls.h" | 54 #include "extensions/common/extension_urls.h" |
55 #include "ui/gfx/image/image.h" | 55 #include "ui/gfx/image/image.h" |
56 | 56 |
57 using content::NavigationController; | 57 using content::NavigationController; |
58 using content::NavigationEntry; | 58 using content::NavigationEntry; |
59 using content::RenderViewHost; | 59 using content::RenderViewHost; |
60 using content::WebContents; | 60 using content::WebContents; |
61 | 61 |
62 DEFINE_WEB_CONTENTS_USER_DATA_KEY(extensions::TabHelper); | 62 DEFINE_WEB_CONTENTS_USER_DATA_KEY(extensions::TabHelper); |
63 | 63 |
64 namespace { | |
65 | |
66 const char kPermissionError[] = "permission_error"; | |
67 | |
68 } // namespace | |
69 | |
70 namespace extensions { | 64 namespace extensions { |
71 | 65 |
72 TabHelper::ScriptExecutionObserver::ScriptExecutionObserver( | 66 TabHelper::ScriptExecutionObserver::ScriptExecutionObserver( |
73 TabHelper* tab_helper) | 67 TabHelper* tab_helper) |
74 : tab_helper_(tab_helper) { | 68 : tab_helper_(tab_helper) { |
75 tab_helper_->AddScriptExecutionObserver(this); | 69 tab_helper_->AddScriptExecutionObserver(this); |
76 } | 70 } |
77 | 71 |
78 TabHelper::ScriptExecutionObserver::ScriptExecutionObserver() | 72 TabHelper::ScriptExecutionObserver::ScriptExecutionObserver() |
79 : tab_helper_(NULL) { | 73 : tab_helper_(NULL) { |
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
484 } | 478 } |
485 } | 479 } |
486 | 480 |
487 void TabHelper::SetTabId(RenderViewHost* render_view_host) { | 481 void TabHelper::SetTabId(RenderViewHost* render_view_host) { |
488 render_view_host->Send( | 482 render_view_host->Send( |
489 new ExtensionMsg_SetTabId(render_view_host->GetRoutingID(), | 483 new ExtensionMsg_SetTabId(render_view_host->GetRoutingID(), |
490 SessionID::IdForTab(web_contents()))); | 484 SessionID::IdForTab(web_contents()))); |
491 } | 485 } |
492 | 486 |
493 } // namespace extensions | 487 } // namespace extensions |
OLD | NEW |