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

Side by Side Diff: chrome/browser/ui/ash/ash_keyboard_controller_proxy.cc

Issue 1201063002: Set up the infrastructure for Extension event metrics. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebaaaaase Created 5 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
« no previous file with comments | « chrome/browser/ui/app_list/search/people/people_result.cc ('k') | extensions/browser/OWNERS » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/ui/ash/ash_keyboard_controller_proxy.h" 5 #include "chrome/browser/ui/ash/ash_keyboard_controller_proxy.h"
6 6
7 #include "ash/display/display_controller.h" 7 #include "ash/display/display_controller.h"
8 #include "ash/shell.h" 8 #include "ash/shell.h"
9 #include "chrome/browser/extensions/chrome_extension_web_contents_observer.h" 9 #include "chrome/browser/extensions/chrome_extension_web_contents_observer.h"
10 #include "chrome/browser/media/media_capture_devices_dispatcher.h" 10 #include "chrome/browser/media/media_capture_devices_dispatcher.h"
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 87
88 scoped_ptr<base::ListValue> event_args(new base::ListValue()); 88 scoped_ptr<base::ListValue> event_args(new base::ListValue());
89 scoped_ptr<base::DictionaryValue> new_bounds(new base::DictionaryValue()); 89 scoped_ptr<base::DictionaryValue> new_bounds(new base::DictionaryValue());
90 new_bounds->SetInteger("left", bounds.x()); 90 new_bounds->SetInteger("left", bounds.x());
91 new_bounds->SetInteger("top", bounds.y()); 91 new_bounds->SetInteger("top", bounds.y());
92 new_bounds->SetInteger("width", bounds.width()); 92 new_bounds->SetInteger("width", bounds.width());
93 new_bounds->SetInteger("height", bounds.height()); 93 new_bounds->SetInteger("height", bounds.height());
94 event_args->Append(new_bounds.release()); 94 event_args->Append(new_bounds.release());
95 95
96 scoped_ptr<extensions::Event> event(new extensions::Event( 96 scoped_ptr<extensions::Event> event(new extensions::Event(
97 extensions::events::UNKNOWN,
97 virtual_keyboard_private::OnBoundsChanged::kEventName, 98 virtual_keyboard_private::OnBoundsChanged::kEventName,
98 event_args.Pass())); 99 event_args.Pass()));
99 event->restrict_to_browser_context = context_; 100 event->restrict_to_browser_context = context_;
100 router->BroadcastEvent(event.Pass()); 101 router->BroadcastEvent(event.Pass());
101 } 102 }
102 103
103 private: 104 private:
104 content::BrowserContext* context_; 105 content::BrowserContext* context_;
105 106
106 DISALLOW_COPY_AND_ASSIGN(AshKeyboardControllerObserver); 107 DISALLOW_COPY_AND_ASSIGN(AshKeyboardControllerObserver);
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 } 195 }
195 196
196 scoped_ptr<base::ListValue> event_args(new base::ListValue()); 197 scoped_ptr<base::ListValue> event_args(new base::ListValue());
197 scoped_ptr<base::DictionaryValue> input_context(new base::DictionaryValue()); 198 scoped_ptr<base::DictionaryValue> input_context(new base::DictionaryValue());
198 input_context->SetString("type", 199 input_context->SetString("type",
199 virtual_keyboard_private::ToString( 200 virtual_keyboard_private::ToString(
200 TextInputTypeToGeneratedInputTypeEnum(type))); 201 TextInputTypeToGeneratedInputTypeEnum(type)));
201 event_args->Append(input_context.release()); 202 event_args->Append(input_context.release());
202 203
203 scoped_ptr<extensions::Event> event(new extensions::Event( 204 scoped_ptr<extensions::Event> event(new extensions::Event(
205 extensions::events::UNKNOWN,
204 virtual_keyboard_private::OnTextInputBoxFocused::kEventName, 206 virtual_keyboard_private::OnTextInputBoxFocused::kEventName,
205 event_args.Pass())); 207 event_args.Pass()));
206 event->restrict_to_browser_context = browser_context(); 208 event->restrict_to_browser_context = browser_context();
207 router->DispatchEventToExtension(kVirtualKeyboardExtensionID, event.Pass()); 209 router->DispatchEventToExtension(kVirtualKeyboardExtensionID, event.Pass());
208 } 210 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/app_list/search/people/people_result.cc ('k') | extensions/browser/OWNERS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698