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

Side by Side Diff: chrome/browser/ui/webui/options/chromeos/change_picture_options_handler.cc

Issue 6976040: Revert 86914 - Move a bunch of functions from Window onto Widget. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 7 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 | Annotate | Revision Log
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/callback.h" 7 #include "base/callback.h"
8 #include "base/path_service.h" 8 #include "base/path_service.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "chrome/browser/chromeos/login/default_user_images.h" 10 #include "chrome/browser/chromeos/login/default_user_images.h"
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 GetBrowserWindow(), 110 GetBrowserWindow(),
111 NULL); 111 NULL);
112 } 112 }
113 113
114 void ChangePictureOptionsHandler::TakePhoto(const ListValue* args) { 114 void ChangePictureOptionsHandler::TakePhoto(const ListValue* args) {
115 DCHECK(args && args->empty()); 115 DCHECK(args && args->empty());
116 views::Window* window = browser::CreateViewsWindow( 116 views::Window* window = browser::CreateViewsWindow(
117 GetBrowserWindow(), 117 GetBrowserWindow(),
118 gfx::Rect(), 118 gfx::Rect(),
119 new TakePhotoDialog()); 119 new TakePhotoDialog());
120 window->SetAlwaysOnTop(true); 120 window->SetIsAlwaysOnTop(true);
121 window->Show(); 121 window->Show();
122 } 122 }
123 123
124 void ChangePictureOptionsHandler::GetAvailableImages(const ListValue* args) { 124 void ChangePictureOptionsHandler::GetAvailableImages(const ListValue* args) {
125 DCHECK(args && args->empty()); 125 DCHECK(args && args->empty());
126 ListValue image_urls; 126 ListValue image_urls;
127 for (int i = 0; i < kDefaultImagesCount; ++i) { 127 for (int i = 0; i < kDefaultImagesCount; ++i) {
128 image_urls.Append(new StringValue(GetDefaultImageUrl(i))); 128 image_urls.Append(new StringValue(GetDefaultImageUrl(i)));
129 } 129 }
130 web_ui_->CallJavascriptFunction("ChangePictureOptions.addUserImages", 130 web_ui_->CallJavascriptFunction("ChangePictureOptions.addUserImages",
(...skipping 28 matching lines...) Expand all
159 } 159 }
160 160
161 gfx::NativeWindow ChangePictureOptionsHandler::GetBrowserWindow() const { 161 gfx::NativeWindow ChangePictureOptionsHandler::GetBrowserWindow() const {
162 Browser* browser = BrowserList::FindBrowserWithProfile(web_ui_->GetProfile()); 162 Browser* browser = BrowserList::FindBrowserWithProfile(web_ui_->GetProfile());
163 if (!browser) 163 if (!browser)
164 return NULL; 164 return NULL;
165 return browser->window()->GetNativeHandle(); 165 return browser->window()->GetNativeHandle();
166 } 166 }
167 167
168 } // namespace chromeos 168 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/task_manager_view.cc ('k') | chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698