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

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

Issue 8833004: Remove BubbleDelegateView ctor color arg, add simple setter/getter. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Pass set_color SkColor arg by value. Created 9 years 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/views/page_info_bubble_view.cc ('k') | ui/aura_shell/examples/bubble.cc » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 <algorithm> 5 #include <algorithm>
6 #include <vector> 6 #include <vector>
7 7
8 #include "chrome/browser/ui/browser.h" 8 #include "chrome/browser/ui/browser.h"
9 #include "chrome/browser/ui/intents/web_intent_picker.h" 9 #include "chrome/browser/ui/intents/web_intent_picker.h"
10 #include "chrome/browser/ui/intents/web_intent_picker_delegate.h" 10 #include "chrome/browser/ui/intents/web_intent_picker_delegate.h"
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 WebIntentPickerView* bubble_delegate = 139 WebIntentPickerView* bubble_delegate =
140 new WebIntentPickerView(anchor_view, wrapper, delegate); 140 new WebIntentPickerView(anchor_view, wrapper, delegate);
141 browser::CreateViewsBubble(bubble_delegate); 141 browser::CreateViewsBubble(bubble_delegate);
142 bubble_delegate->Show(); 142 bubble_delegate->Show();
143 return bubble_delegate; 143 return bubble_delegate;
144 } 144 }
145 145
146 WebIntentPickerView::WebIntentPickerView(views::View* anchor_view, 146 WebIntentPickerView::WebIntentPickerView(views::View* anchor_view,
147 TabContentsWrapper* wrapper, 147 TabContentsWrapper* wrapper,
148 WebIntentPickerDelegate* delegate) 148 WebIntentPickerDelegate* delegate)
149 : BubbleDelegateView(anchor_view, 149 : BubbleDelegateView(anchor_view, views::BubbleBorder::TOP_LEFT),
150 views::BubbleBorder::TOP_LEFT,
151 SK_ColorWHITE),
152 delegate_(delegate), 150 delegate_(delegate),
153 button_hbox_(NULL) {} 151 button_hbox_(NULL) {}
154 152
155 WebIntentPickerView::~WebIntentPickerView() { 153 WebIntentPickerView::~WebIntentPickerView() {
156 } 154 }
157 155
158 void WebIntentPickerView::ButtonPressed(views::Button* sender, 156 void WebIntentPickerView::ButtonPressed(views::Button* sender,
159 const views::Event& event) { 157 const views::Event& event) {
160 // TODO(binji) When we support the plus button, pressing it should forward the 158 // TODO(binji) When we support the plus button, pressing it should forward the
161 // user to services in the Chrome Web Store that provide this intent. 159 // user to services in the Chrome Web Store that provide this intent.
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 views::Label* bottom_label = new views::Label( 251 views::Label* bottom_label = new views::Label(
254 l10n_util::GetStringUTF16(IDS_FIND_MORE_INTENT_HANDLER_MESSAGE)); 252 l10n_util::GetStringUTF16(IDS_FIND_MORE_INTENT_HANDLER_MESSAGE));
255 bottom_label->SetMultiLine(true); 253 bottom_label->SetMultiLine(true);
256 bottom_label->SetHorizontalAlignment(views::Label::ALIGN_LEFT); 254 bottom_label->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
257 bottom_label->SetFont( 255 bottom_label->SetFont(
258 bottom_label->font().DeriveFont(kWebStoreLabelFontDelta)); 256 bottom_label->font().DeriveFont(kWebStoreLabelFontDelta));
259 main_content->AddChildView(bottom_label); 257 main_content->AddChildView(bottom_label);
260 258
261 AddChildView(main_content); 259 AddChildView(main_content);
262 } 260 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/page_info_bubble_view.cc ('k') | ui/aura_shell/examples/bubble.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698