OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/tabs/tabs_event_router.h" | 5 #include "chrome/browser/extensions/api/tabs/tabs_event_router.h" |
6 | 6 |
7 #include "base/json/json_writer.h" | 7 #include "base/json/json_writer.h" |
8 #include "base/values.h" | 8 #include "base/values.h" |
9 #include "chrome/browser/chrome_notification_types.h" | 9 #include "chrome/browser/chrome_notification_types.h" |
10 #include "chrome/browser/extensions/api/tabs/tabs_constants.h" | 10 #include "chrome/browser/extensions/api/tabs/tabs_constants.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 #include "content/public/browser/navigation_entry.h" | 22 #include "content/public/browser/navigation_entry.h" |
23 #include "content/public/browser/notification_service.h" | 23 #include "content/public/browser/notification_service.h" |
24 #include "content/public/browser/notification_types.h" | 24 #include "content/public/browser/notification_types.h" |
25 #include "content/public/browser/web_contents.h" | 25 #include "content/public/browser/web_contents.h" |
26 | 26 |
27 using base::DictionaryValue; | 27 using base::DictionaryValue; |
28 using base::ListValue; | 28 using base::ListValue; |
29 using base::FundamentalValue; | 29 using base::FundamentalValue; |
30 using content::NavigationController; | 30 using content::NavigationController; |
31 using content::WebContents; | 31 using content::WebContents; |
| 32 using ui_zoom::ZoomController; |
32 | 33 |
33 namespace extensions { | 34 namespace extensions { |
34 | 35 |
35 namespace { | 36 namespace { |
36 | 37 |
37 namespace tabs = api::tabs; | 38 namespace tabs = api::tabs; |
38 | 39 |
39 void WillDispatchTabUpdatedEvent( | 40 void WillDispatchTabUpdatedEvent( |
40 WebContents* contents, | 41 WebContents* contents, |
41 const base::DictionaryValue* changed_properties, | 42 const base::DictionaryValue* changed_properties, |
(...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
576 // Dispatch the |onZoomChange| event. | 577 // Dispatch the |onZoomChange| event. |
577 Profile* profile = Profile::FromBrowserContext( | 578 Profile* profile = Profile::FromBrowserContext( |
578 data.web_contents->GetBrowserContext()); | 579 data.web_contents->GetBrowserContext()); |
579 DispatchEvent(profile, | 580 DispatchEvent(profile, |
580 tabs::OnZoomChange::kEventName, | 581 tabs::OnZoomChange::kEventName, |
581 api::tabs::OnZoomChange::Create(zoom_change_info), | 582 api::tabs::OnZoomChange::Create(zoom_change_info), |
582 EventRouter::USER_GESTURE_UNKNOWN); | 583 EventRouter::USER_GESTURE_UNKNOWN); |
583 } | 584 } |
584 | 585 |
585 } // namespace extensions | 586 } // namespace extensions |
OLD | NEW |