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

Side by Side Diff: chrome/browser/chromeos/set_time_dialog.cc

Issue 2771233002: Remove the wrapper functions content::RecordAction et al (Closed)
Patch Set: Rebased Created 3 years, 9 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/chromeos/set_time_dialog.h" 5 #include "chrome/browser/chromeos/set_time_dialog.h"
6 6
7 #include "ash/public/cpp/shell_window_ids.h" 7 #include "ash/public/cpp/shell_window_ids.h"
8 #include "base/metrics/user_metrics.h"
8 #include "chrome/browser/profiles/profile_manager.h" 9 #include "chrome/browser/profiles/profile_manager.h"
9 #include "chrome/browser/ui/browser_dialogs.h" 10 #include "chrome/browser/ui/browser_dialogs.h"
10 #include "chrome/common/url_constants.h" 11 #include "chrome/common/url_constants.h"
11 #include "content/public/browser/user_metrics.h"
12 #include "ui/gfx/geometry/size.h" 12 #include "ui/gfx/geometry/size.h"
13 13
14 using content::WebContents; 14 using content::WebContents;
15 using content::WebUIMessageHandler; 15 using content::WebUIMessageHandler;
16 16
17 namespace chromeos { 17 namespace chromeos {
18 18
19 namespace { 19 namespace {
20 20
21 const int kDefaultWidth = 490; 21 const int kDefaultWidth = 490;
22 const int kDefaultHeight = 235; 22 const int kDefaultHeight = 235;
23 23
24 } // namespace 24 } // namespace
25 25
26 // static 26 // static
27 void SetTimeDialog::ShowDialogInParent(gfx::NativeWindow parent) { 27 void SetTimeDialog::ShowDialogInParent(gfx::NativeWindow parent) {
28 DCHECK(parent); 28 DCHECK(parent);
29 content::RecordAction(base::UserMetricsAction("Options_SetTimeDialog_Show")); 29 base::RecordAction(base::UserMetricsAction("Options_SetTimeDialog_Show"));
30 chrome::ShowWebDialog(parent, ProfileManager::GetActiveUserProfile(), 30 chrome::ShowWebDialog(parent, ProfileManager::GetActiveUserProfile(),
31 new SetTimeDialog()); 31 new SetTimeDialog());
32 } 32 }
33 33
34 // static 34 // static
35 void SetTimeDialog::ShowDialogInContainer(int container_id) { 35 void SetTimeDialog::ShowDialogInContainer(int container_id) {
36 DCHECK_NE(container_id, ash::kShellWindowId_Invalid); 36 DCHECK_NE(container_id, ash::kShellWindowId_Invalid);
37 content::RecordAction(base::UserMetricsAction("Options_SetTimeDialog_Show")); 37 base::RecordAction(base::UserMetricsAction("Options_SetTimeDialog_Show"));
38 chrome::ShowWebDialogInContainer(container_id, 38 chrome::ShowWebDialogInContainer(container_id,
39 ProfileManager::GetActiveUserProfile(), 39 ProfileManager::GetActiveUserProfile(),
40 new SetTimeDialog()); 40 new SetTimeDialog());
41 } 41 }
42 42
43 SetTimeDialog::SetTimeDialog() { 43 SetTimeDialog::SetTimeDialog() {
44 } 44 }
45 45
46 SetTimeDialog::~SetTimeDialog() { 46 SetTimeDialog::~SetTimeDialog() {
47 } 47 }
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 return false; 83 return false;
84 } 84 }
85 85
86 bool SetTimeDialog::HandleContextMenu( 86 bool SetTimeDialog::HandleContextMenu(
87 const content::ContextMenuParams& params) { 87 const content::ContextMenuParams& params) {
88 // Disable context menu. 88 // Disable context menu.
89 return true; 89 return true;
90 } 90 }
91 91
92 } // namespace chromeos 92 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698