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/webui/options/chromeos/change_picture_options_handler.cc

Issue 8479042: UI polish for certificate viewer (Closed) Base URL: /usr/local/google/home/bshe/NoTouchChromium/../TouchChromium/src/@trunk
Patch Set: Remove body margins of two internal pages(due to the changes in tabs.css file). Created 9 years, 1 month 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) 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 "chrome/browser/ui/webui/options/chromeos/change_picture_options_handle r.h" 5 #include "chrome/browser/ui/webui/options/chromeos/change_picture_options_handle r.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
11 #include "base/string_util.h" 11 #include "base/string_util.h"
12 #include "base/values.h" 12 #include "base/values.h"
13 #include "chrome/browser/chromeos/login/camera_detector.h" 13 #include "chrome/browser/chromeos/login/camera_detector.h"
14 #include "chrome/browser/chromeos/login/default_user_images.h" 14 #include "chrome/browser/chromeos/login/default_user_images.h"
15 #include "chrome/browser/chromeos/login/user_manager.h" 15 #include "chrome/browser/chromeos/login/user_manager.h"
16 #include "chrome/browser/chromeos/options/take_photo_dialog.h" 16 #include "chrome/browser/chromeos/options/take_photo_dialog.h"
17 #include "chrome/browser/profiles/profile.h" 17 #include "chrome/browser/profiles/profile.h"
18 #include "chrome/browser/ui/browser_list.h" 18 #include "chrome/browser/ui/browser_list.h"
19 #include "chrome/browser/ui/browser_window.h" 19 #include "chrome/browser/ui/browser_window.h"
20 #include "chrome/browser/ui/dialog_style.h"
20 #include "chrome/browser/ui/views/window.h" 21 #include "chrome/browser/ui/views/window.h"
21 #include "chrome/browser/ui/webui/web_ui_util.cc" 22 #include "chrome/browser/ui/webui/web_ui_util.cc"
22 #include "chrome/common/chrome_notification_types.h" 23 #include "chrome/common/chrome_notification_types.h"
23 #include "chrome/common/chrome_paths.h" 24 #include "chrome/common/chrome_paths.h"
24 #include "chrome/common/url_constants.h" 25 #include "chrome/common/url_constants.h"
25 #include "content/public/browser/notification_service.h" 26 #include "content/public/browser/notification_service.h"
26 #include "content/public/common/url_constants.h" 27 #include "content/public/common/url_constants.h"
27 #include "grit/generated_resources.h" 28 #include "grit/generated_resources.h"
28 #include "grit/theme_resources.h" 29 #include "grit/theme_resources.h"
29 #include "third_party/skia/include/core/SkBitmap.h" 30 #include "third_party/skia/include/core/SkBitmap.h"
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 FILE_PATH_LITERAL(""), 155 FILE_PATH_LITERAL(""),
155 web_ui_->tab_contents(), 156 web_ui_->tab_contents(),
156 GetBrowserWindow(), 157 GetBrowserWindow(),
157 NULL); 158 NULL);
158 } 159 }
159 160
160 void ChangePictureOptionsHandler::HandleTakePhoto(const ListValue* args) { 161 void ChangePictureOptionsHandler::HandleTakePhoto(const ListValue* args) {
161 DCHECK(args && args->empty()); 162 DCHECK(args && args->empty());
162 views::Widget* window = browser::CreateViewsWindow( 163 views::Widget* window = browser::CreateViewsWindow(
163 GetBrowserWindow(), 164 GetBrowserWindow(),
164 new TakePhotoDialog(this)); 165 new TakePhotoDialog(this), STYLE_GENERIC);
flackr 2011/11/21 20:43:31 One argument per line.
bshe 2011/11/22 16:26:24 Done.
165 window->SetAlwaysOnTop(true); 166 window->SetAlwaysOnTop(true);
166 window->Show(); 167 window->Show();
167 } 168 }
168 169
169 void ChangePictureOptionsHandler::HandleOnPageShown( 170 void ChangePictureOptionsHandler::HandleOnPageShown(
170 const base::ListValue* args) { 171 const base::ListValue* args) {
171 DCHECK(args && args->empty()); 172 DCHECK(args && args->empty());
172 CheckCameraPresence(); 173 CheckCameraPresence();
173 SendSelectedImage(); 174 SendSelectedImage();
174 UpdateProfileImage(); 175 UpdateProfileImage();
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 327
327 gfx::NativeWindow ChangePictureOptionsHandler::GetBrowserWindow() const { 328 gfx::NativeWindow ChangePictureOptionsHandler::GetBrowserWindow() const {
328 Browser* browser = 329 Browser* browser =
329 BrowserList::FindBrowserWithProfile(Profile::FromWebUI(web_ui_)); 330 BrowserList::FindBrowserWithProfile(Profile::FromWebUI(web_ui_));
330 if (!browser) 331 if (!browser)
331 return NULL; 332 return NULL;
332 return browser->window()->GetNativeHandle(); 333 return browser->window()->GetNativeHandle();
333 } 334 }
334 335
335 } // namespace chromeos 336 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698