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

Side by Side Diff: chrome/browser/ui/views/global_error_bubble_view.cc

Issue 2833603003: Log the creation of more dialog box types. (Closed)
Patch Set: Fix simple merge conflict. Created 3 years, 8 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/ui/views/global_error_bubble_view.h" 5 #include "chrome/browser/ui/views/global_error_bubble_view.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/strings/utf_string_conversions.h" 11 #include "base/strings/utf_string_conversions.h"
12 #include "chrome/browser/ui/browser_dialogs.h"
12 #include "chrome/browser/ui/global_error/global_error.h" 13 #include "chrome/browser/ui/global_error/global_error.h"
13 #include "chrome/browser/ui/global_error/global_error_service.h" 14 #include "chrome/browser/ui/global_error/global_error_service.h"
14 #include "chrome/browser/ui/global_error/global_error_service_factory.h" 15 #include "chrome/browser/ui/global_error/global_error_service_factory.h"
15 #include "chrome/browser/ui/layout_constants.h" 16 #include "chrome/browser/ui/layout_constants.h"
16 #include "chrome/browser/ui/views/elevation_icon_setter.h" 17 #include "chrome/browser/ui/views/elevation_icon_setter.h"
17 #include "chrome/browser/ui/views/harmony/chrome_layout_provider.h" 18 #include "chrome/browser/ui/views/harmony/chrome_layout_provider.h"
18 #include "chrome/browser/ui/views/toolbar/app_menu_button.h" 19 #include "chrome/browser/ui/views/toolbar/app_menu_button.h"
19 #include "chrome/browser/ui/views/toolbar/toolbar_view.h" 20 #include "chrome/browser/ui/views/toolbar/toolbar_view.h"
20 #include "ui/base/resource/resource_bundle.h" 21 #include "ui/base/resource/resource_bundle.h"
21 #include "ui/base/ui_features.h" 22 #include "ui/base/ui_features.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 views::View* anchor_view, 63 views::View* anchor_view,
63 const gfx::Point& anchor_point, 64 const gfx::Point& anchor_point,
64 views::BubbleBorder::Arrow arrow, 65 views::BubbleBorder::Arrow arrow,
65 Browser* browser, 66 Browser* browser,
66 const base::WeakPtr<GlobalErrorWithStandardBubble>& error) 67 const base::WeakPtr<GlobalErrorWithStandardBubble>& error)
67 : BubbleDialogDelegateView(anchor_view, arrow), 68 : BubbleDialogDelegateView(anchor_view, arrow),
68 browser_(browser), 69 browser_(browser),
69 error_(error) { 70 error_(error) {
70 if (!anchor_view) 71 if (!anchor_view)
71 SetAnchorRect(gfx::Rect(anchor_point, gfx::Size())); 72 SetAnchorRect(gfx::Rect(anchor_point, gfx::Size()));
73 chrome::RecordDialogCreation(chrome::DialogIdentifier::GLOBAL_ERROR);
72 } 74 }
73 75
74 GlobalErrorBubbleView::~GlobalErrorBubbleView() {} 76 GlobalErrorBubbleView::~GlobalErrorBubbleView() {}
75 77
76 base::string16 GlobalErrorBubbleView::GetWindowTitle() const { 78 base::string16 GlobalErrorBubbleView::GetWindowTitle() const {
77 if (!error_) 79 if (!error_)
78 return base::string16(); 80 return base::string16();
79 return error_->GetBubbleViewTitle(); 81 return error_->GetBubbleViewTitle();
80 } 82 }
81 83
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 } 192 }
191 193
192 bool GlobalErrorBubbleView::Close() { 194 bool GlobalErrorBubbleView::Close() {
193 // Don't fall through to either Cancel() or Accept(). 195 // Don't fall through to either Cancel() or Accept().
194 return true; 196 return true;
195 } 197 }
196 198
197 void GlobalErrorBubbleView::CloseBubbleView() { 199 void GlobalErrorBubbleView::CloseBubbleView() {
198 GetWidget()->Close(); 200 GetWidget()->Close();
199 } 201 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698